李达明
1 month ago
33 changed files with 4496 additions and 4 deletions
@ -0,0 +1,50 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CellCoreVO { |
|||
id: number |
|||
acoreThi: string |
|||
acoreWid: number |
|||
bcoreThi: string |
|||
bcoreWid: number |
|||
} |
|||
|
|||
// 查询battery_cell_core列表
|
|||
export const getCellCorePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/cellCore/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/cellCore/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_core详情
|
|||
export const getCellCore = async (id: number) => { |
|||
return await request.get({ url: `/battery/cellCore/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_core
|
|||
export const createCellCore = async (data: CellCoreVO) => { |
|||
return await request.post({ url: `/battery/cellCore/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_core
|
|||
export const updateCellCore = async (data: CellCoreVO) => { |
|||
return await request.put({ url: `/battery/cellCore/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_core
|
|||
export const deleteCellCore = async (id: number) => { |
|||
return await request.delete({ url: `/battery/cellCore/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_core Excel
|
|||
export const exportCellCore = async (params) => { |
|||
return await request.download({ url: `/battery/cellCore/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/cellCore/get-import-template' }) |
|||
} |
@ -0,0 +1,54 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CellDeviceVO { |
|||
id: number |
|||
oneInjectPreCpk: number |
|||
twoInjectPreCpk: number |
|||
posCoatDenCpk: number |
|||
negCoatDenCpk: number |
|||
posRollThickCpk: number |
|||
negRollThickCpk: number |
|||
oneInjectCpk: number |
|||
finalInjectRetenCpk: number |
|||
} |
|||
|
|||
// 查询battery_cell_device列表
|
|||
export const getCellDevicePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/cellDevice/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/cellDevice/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_device详情
|
|||
export const getCellDevice = async (id: number) => { |
|||
return await request.get({ url: `/battery/cellDevice/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_device
|
|||
export const createCellDevice = async (data: CellDeviceVO) => { |
|||
return await request.post({ url: `/battery/cellDevice/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_device
|
|||
export const updateCellDevice = async (data: CellDeviceVO) => { |
|||
return await request.put({ url: `/battery/cellDevice/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_device
|
|||
export const deleteCellDevice = async (id: number) => { |
|||
return await request.delete({ url: `/battery/cellDevice/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_device Excel
|
|||
export const exportCellDevice = async (params) => { |
|||
return await request.download({ url: `/battery/cellDevice/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/cellDevice/get-import-template' }) |
|||
} |
@ -0,0 +1,70 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CellEnvVO { |
|||
id: number |
|||
temOfPriinjectPlant: string |
|||
temOfPreStandPlant: string |
|||
temOfStandPlant: string |
|||
temOfAftStandPlant: string |
|||
temOfSecinjectPlant: string |
|||
tempOfBefVolSepPlant: string |
|||
tempOfVolSepPlant: string |
|||
humOfVolAssPlant: number |
|||
humOfPriinjectPlant: number |
|||
humOfPreStandPlant: number |
|||
humOfStandPlant: number |
|||
humOfAftStandPlant: number |
|||
humOfSecinjectPlant: number |
|||
humpOfBefVolSepPlant: number |
|||
humpOfVolSepPlant: number |
|||
standardOfClean: string |
|||
cleanOfCoatPlant: string |
|||
cleanOfRollPlant: string |
|||
cleanOfSlitPlant: string |
|||
cleanOfStackPlant: string |
|||
cleanOfPriInjectPlant: string |
|||
cOfPreStandPlant: string |
|||
clOfStandPlant: string |
|||
cleanOfAftStandPlant: string |
|||
} |
|||
|
|||
// 查询battery_cell_env列表
|
|||
export const getCellEnvPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/cellEnv/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/cellEnv/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_env详情
|
|||
export const getCellEnv = async (id: number) => { |
|||
return await request.get({ url: `/battery/cellEnv/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_env
|
|||
export const createCellEnv = async (data: CellEnvVO) => { |
|||
return await request.post({ url: `/battery/cellEnv/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_env
|
|||
export const updateCellEnv = async (data: CellEnvVO) => { |
|||
return await request.put({ url: `/battery/cellEnv/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_env
|
|||
export const deleteCellEnv = async (id: number) => { |
|||
return await request.delete({ url: `/battery/cellEnv/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_env Excel
|
|||
export const exportCellEnv = async (params) => { |
|||
return await request.download({ url: `/battery/cellEnv/exportExcel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/cellEnv/get-import-template' }) |
|||
} |
@ -0,0 +1,50 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CellPassVO { |
|||
id: number |
|||
passPer: string |
|||
equAbnList: string |
|||
equAbnAlarm: string |
|||
environAbnoralarm: string |
|||
} |
|||
|
|||
// 查询battery_cell_pass列表
|
|||
export const getCellPassPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/cellPass/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/cellPass/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_pass详情
|
|||
export const getCellPass = async (id: number) => { |
|||
return await request.get({ url: `/battery/cellPass/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_pass
|
|||
export const createCellPass = async (data: CellPassVO) => { |
|||
return await request.post({ url: `/battery/cellPass/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_pass
|
|||
export const updateCellPass = async (data: CellPassVO) => { |
|||
return await request.put({ url: `/battery/cellPass/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_pass
|
|||
export const deleteCellPass = async (id: number) => { |
|||
return await request.delete({ url: `/battery/cellPass/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_pass Excel
|
|||
export const exportCellPass = async (params) => { |
|||
return await request.download({ url: `/battery/cellPass/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/cellPass/get-import-template' }) |
|||
} |
@ -0,0 +1,61 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CellPlateVO { |
|||
id: number |
|||
posPowrMagSub: number |
|||
negPowrMagSub: number |
|||
posSlurMagSub: number |
|||
negSlurMagSub: number |
|||
posPolOneSidDen: string |
|||
negPolOneSidDen: string |
|||
posPolDouSidDen: string |
|||
negPolDouSidDen: string |
|||
posColTh: string |
|||
negColTh: string |
|||
posPolLen: string |
|||
negPolLen: string |
|||
diaThiAftDieSli: number |
|||
verHeiAftDieSli: number |
|||
mosConPolAftBak: number |
|||
} |
|||
|
|||
// 查询battery_cell_plate列表
|
|||
export const getCellPlatePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/cellPlate/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/cellPlate/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_plate详情
|
|||
export const getCellPlate = async (id: number) => { |
|||
return await request.get({ url: `/battery/cellPlate/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_plate
|
|||
export const createCellPlate = async (data: CellPlateVO) => { |
|||
return await request.post({ url: `/battery/cellPlate/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_plate
|
|||
export const updateCellPlate = async (data: CellPlateVO) => { |
|||
return await request.put({ url: `/battery/cellPlate/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_plate
|
|||
export const deleteCellPlate = async (id: number) => { |
|||
return await request.delete({ url: `/battery/cellPlate/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_plate Excel
|
|||
export const exportCellPlate = async (params) => { |
|||
return await request.download({ url: `/battery/cellPlate/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/cellPlate/get-import-template' }) |
|||
} |
@ -0,0 +1,57 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CellProdVO { |
|||
id: number |
|||
vacLeaValOrHelVal: string |
|||
helDetAftWel: string |
|||
tolInj: string |
|||
tolInjPerDev: string |
|||
totWeight: string |
|||
facVol: string |
|||
quantitative: string |
|||
impAc: string |
|||
celLen: string |
|||
celWid: string |
|||
celThi: string |
|||
} |
|||
|
|||
// 查询battery_cell_prod列表
|
|||
export const getCellProdPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/cellProd/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/cellProd/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_prod详情
|
|||
export const getCellProd = async (id: number) => { |
|||
return await request.get({ url: `/battery/cellProd/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_prod
|
|||
export const createCellProd = async (data: CellProdVO) => { |
|||
return await request.post({ url: `/battery/cellProd/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_prod
|
|||
export const updateCellProd = async (data: CellProdVO) => { |
|||
return await request.put({ url: `/battery/cellProd/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_prod
|
|||
export const deleteCellProd = async (id: number) => { |
|||
return await request.delete({ url: `/battery/cellProd/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_prod Excel
|
|||
export const exportCellProd = async (params) => { |
|||
return await request.download({ url: `/battery/cellProd/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/cellProd/get-import-template' }) |
|||
} |
@ -0,0 +1,134 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface MonomerVO { |
|||
id: number |
|||
release:String |
|||
version: String |
|||
date: String |
|||
name: String |
|||
author: String |
|||
timeStamp: String |
|||
workNo: String |
|||
endTime: String |
|||
actCycle: String |
|||
pLineId: String |
|||
pType: String |
|||
testType: String |
|||
procImage: String |
|||
workRemark: String |
|||
procRemark: String |
|||
type: String |
|||
|
|||
acoreThi: String |
|||
acoreWid: String |
|||
bcoreThi: String |
|||
bcoreWid: String |
|||
|
|||
oneInjectPreCpk: String |
|||
twoInjectPreCpk: String |
|||
posCoatDenCpk: String |
|||
negCoatDenCpk: String |
|||
posRollThickCpk: String |
|||
negRollThickCpk: String |
|||
oneInjectCpk: String |
|||
finalInjectRetenCpk: String |
|||
|
|||
temOfPriinjectPlant: String |
|||
temOfPreStandPlant: String |
|||
temOfStandPlant: String |
|||
temOfAftStandPlant: String |
|||
temOfSecinjectPlant: String |
|||
tempOfBefVolSepPlant: String |
|||
tempOfVolSepPlant: String |
|||
humOfVolAssPlant: String |
|||
humOfPriinjectPlant: String |
|||
humOfPreStandPlant: String |
|||
humOfStandPlant: String |
|||
humOfAftStandPlant: String |
|||
humOfSecinjectPlant: String |
|||
humpOfBefVolSepPlant: String |
|||
humpOfVolSepPlant: String |
|||
standardOfClean: String |
|||
cleanOfCoatPlant: String |
|||
cleanOfRollPlant: String |
|||
cleanOfSlitPlant: String |
|||
cleanOfStackPlant: String |
|||
cleanOfPriInjectPlant: String |
|||
cOfPreStandPlant: String |
|||
clOfStandPlant: String |
|||
cleanOfAftStandPlant: String |
|||
|
|||
passPer: String |
|||
equAbnList: String |
|||
equAbnAlarm: String |
|||
environAbnoralarm: String |
|||
|
|||
posPowrMagSub: String |
|||
negPowrMagSub: String |
|||
posSlurMagSub: String |
|||
negSlurMagSub: String |
|||
posPolOneSidDen: String |
|||
negPolOneSidDen: String |
|||
posPolDouSidDen: String |
|||
negPolDouSidDen: String |
|||
posColTh: String |
|||
negColTh: String |
|||
posPolLen: String |
|||
negPolLen: String |
|||
diaThiAftDieSli: String |
|||
verHeiAftDieSli: String |
|||
mosConPolAftBak: String |
|||
|
|||
vacLeaValOrHelVal: String |
|||
helDetAftWel: String |
|||
tolInj: String |
|||
tolInjPerDev: String |
|||
totWeight: String |
|||
facVol: String |
|||
quantitative: String |
|||
impAc: String |
|||
celLen: String |
|||
celWid: String |
|||
celThi: String |
|||
} |
|||
|
|||
// 查询battery_cell_device列表
|
|||
export const getMonomerPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/battery/monomer/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/battery/monomer/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询battery_cell_device详情
|
|||
export const getMonomer = async (id: number) => { |
|||
return await request.get({ url: `/battery/monomer/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增battery_cell_device
|
|||
export const createMonomer = async (data: MonomerVO) => { |
|||
return await request.post({ url: `/battery/monomer/create`, data }) |
|||
} |
|||
|
|||
// 修改battery_cell_device
|
|||
export const updateMonomer = async (data: MonomerVO) => { |
|||
return await request.put({ url: `/battery/monomer/update`, data }) |
|||
} |
|||
|
|||
// 删除battery_cell_device
|
|||
export const deleteMonomer = async (id: number) => { |
|||
return await request.delete({ url: `/battery/monomer/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出battery_cell_device Excel
|
|||
export const exportMonomer = async (params) => { |
|||
return await request.download({ url: `/battery/monomer/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/battery/monomer/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface EqBakeVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询真空烘烤列表
|
|||
export const getEqBakePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/ccwin/eqBake/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/ccwin/eqBake/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询真空烘烤详情
|
|||
export const getEqBake = async (id: number) => { |
|||
return await request.get({ url: `/ccwin/eqBake/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增真空烘烤
|
|||
export const createEqBake = async (data: EqBakeVO) => { |
|||
return await request.post({ url: `/ccwin/eqBake/create`, data }) |
|||
} |
|||
|
|||
// 修改真空烘烤
|
|||
export const updateEqBake = async (data: EqBakeVO) => { |
|||
return await request.put({ url: `/ccwin/eqBake/update`, data }) |
|||
} |
|||
|
|||
// 删除真空烘烤
|
|||
export const deleteEqBake = async (id: number) => { |
|||
return await request.delete({ url: `/ccwin/eqBake/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出真空烘烤 Excel
|
|||
export const exportEqBake = async (params) => { |
|||
return await request.download({ url: `/ccwin/eqBake/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/ccwin/eqBake/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface EqRollWeldingVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询辊焊机列表
|
|||
export const getEqRollWeldingPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/ccwin/eqRollWelding/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/ccwin/eqRollWelding/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询辊焊机详情
|
|||
export const getEqRollWelding = async (id: number) => { |
|||
return await request.get({ url: `/ccwin/eqRollWelding/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增辊焊机
|
|||
export const createEqRollWelding = async (data: EqRollWeldingVO) => { |
|||
return await request.post({ url: `/ccwin/eqRollWelding/create`, data }) |
|||
} |
|||
|
|||
// 修改辊焊机
|
|||
export const updateEqRollWelding = async (data: EqRollWeldingVO) => { |
|||
return await request.put({ url: `/ccwin/eqRollWelding/update`, data }) |
|||
} |
|||
|
|||
// 删除辊焊机
|
|||
export const deleteEqRollWelding = async (id: number) => { |
|||
return await request.delete({ url: `/ccwin/eqRollWelding/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出辊焊机 Excel
|
|||
export const exportEqRollWelding = async (params) => { |
|||
return await request.download({ url: `/ccwin/eqRollWelding/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/ccwin/eqRollWelding/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface PaNmpVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询NMP回收列表
|
|||
export const getPaNmpPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/ccwin/paNmp/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/ccwin/paNmp/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询NMP回收详情
|
|||
export const getPaNmp = async (id: number) => { |
|||
return await request.get({ url: `/ccwin/paNmp/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增NMP回收
|
|||
export const createPaNmp = async (data: PaNmpVO) => { |
|||
return await request.post({ url: `/ccwin/paNmp/create`, data }) |
|||
} |
|||
|
|||
// 修改NMP回收
|
|||
export const updatePaNmp = async (data: PaNmpVO) => { |
|||
return await request.put({ url: `/ccwin/paNmp/update`, data }) |
|||
} |
|||
|
|||
// 删除NMP回收
|
|||
export const deletePaNmp = async (id: number) => { |
|||
return await request.delete({ url: `/ccwin/paNmp/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出NMP回收 Excel
|
|||
export const exportPaNmp = async (params) => { |
|||
return await request.download({ url: `/ccwin/paNmp/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载用户导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/ccwin/paNmp/get-import-template' }) |
|||
} |
@ -0,0 +1,72 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CellCoreRules = reactive({ |
|||
}) |
|||
|
|||
export const CellCore = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: 'id',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: 'A卷芯或叠芯厚度允许偏差', |
|||
field: 'acoreThi', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: 'A卷芯或叠芯宽度允许偏差', |
|||
field: 'acoreWid', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
label: 'B卷芯或叠芯厚度允许偏差', |
|||
field: 'bcoreThi', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: 'B卷芯或叠芯宽度允许偏差', |
|||
field: 'bcoreWid', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
form: { |
|||
component: 'InputNumber', |
|||
value: 0 |
|||
}, |
|||
}, |
|||
{ |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CellCore.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CellCore.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="formsSuccess" |
|||
:rules="CellCoreRules" |
|||
:formAllSchemas="CellCore.allSchemas" |
|||
:apiUpdate="CellCoreApi.updateCellCore" |
|||
:apiCreate="CellCoreApi.createCellCore" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="CellCore.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-core/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CellCore,CellCoreRules } from './cellCore.data' |
|||
import * as CellCoreApi from '@/api/battery/cellCore' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'CellCore' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CellCore.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CellCoreApi.getCellCorePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:cellCore:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellCore:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:cellCore: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:'battery:cellCore:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'battery:cellCore: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =CellCore.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await CellCoreApi.createCellCore(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await CellCoreApi.updateCellCore(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellCore') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CellCoreApi.deleteCellCore(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 CellCoreApi.exportCellCore(tableObject.params) |
|||
download.excel(data, 'battery_cell_core.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_core导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await CellCoreApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,88 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CellDeviceRules = reactive({ |
|||
}) |
|||
|
|||
export const CellDevice = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: 'id',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '一次注液前重CPK允许值', |
|||
field: 'oneInjectPreCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '二次注液前重CPK允许值', |
|||
field: 'twoInjectPreCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极涂布面密度CPK允许值', |
|||
field: 'posCoatDenCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极涂布面密度CPK允许值', |
|||
field: 'negCoatDenCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极辊压厚度CPK允许值', |
|||
field: 'posRollThickCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极辊压厚度CPK允许值', |
|||
field: 'negRollThickCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '第一次注液量CPK允许值', |
|||
field: 'oneInjectCpk', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '最终注液保有量CPK允许值', |
|||
field: 'finalInjectRetenCpk', |
|||
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,246 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CellDevice.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CellDevice.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="formsSuccess" |
|||
:rules="CellDeviceRules" |
|||
:formAllSchemas="CellDevice.allSchemas" |
|||
:apiUpdate="CellDeviceApi.updateCellDevice" |
|||
:apiCreate="CellDeviceApi.createCellDevice" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="CellDevice.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-device/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CellDevice,CellDeviceRules } from './cellDevice.data' |
|||
import * as CellDeviceApi from '@/api/battery/cellDevice' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
import {defaultAddStaticBtn} from "@/utils/disposition/defaultButtons"; |
|||
|
|||
defineOptions({ name: 'CellDevice' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CellDevice.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CellDeviceApi.getCellDevicePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddStaticBtn({hasPermi:'battery:cellDevice:create'}), // 新增 |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:cellDevice:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellDevice:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:cellDevice: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:'battery:cellDevice:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'battery:cellDevice: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =CellDevice.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await CellDeviceApi.createCellDevice(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await CellDeviceApi.updateCellDevice(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellDevice') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CellDeviceApi.deleteCellDevice(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 CellDeviceApi.exportCellDevice(tableObject.params) |
|||
download.excel(data, 'battery_cell_device.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_device导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await CellDeviceApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,184 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CellEnvRules = reactive({ |
|||
}) |
|||
|
|||
export const CellEnv = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: 'id',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '一次注液车间温度允许值', |
|||
field: 'temOfPriinjectPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成前静置车间温度允许值', |
|||
field: 'temOfPreStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成车间温度允许值', |
|||
field: 'temOfStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成后静置车间温度允许值', |
|||
field: 'temOfAftStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '二次注液车间温度允许值', |
|||
field: 'temOfSecinjectPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '分容前静置车间温度允许值', |
|||
field: 'tempOfBefVolSepPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '分容车间温度允许值', |
|||
field: 'tempOfVolSepPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '组装车间湿度允许值', |
|||
field: 'humOfVolAssPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '一次注液车间湿度(露点)允许值', |
|||
field: 'humOfPriinjectPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成前静置车间湿度(露点)允许值', |
|||
field: 'humOfPreStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成车间湿度(露点)允许值', |
|||
field: 'humOfStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成后静置车间湿度(露点)允许值', |
|||
field: 'humOfAftStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '二次注液车间湿度(露点)允许值', |
|||
field: 'humOfSecinjectPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '分容前静置车间湿度允许值', |
|||
field: 'humpOfBefVolSepPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '分容车间湿度允许值', |
|||
field: 'humpOfVolSepPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '洁净度粉尘粒径管控标准', |
|||
field: 'standardOfClean', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '涂布车间洁净度允许值', |
|||
field: 'cleanOfCoatPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '辊压车间洁净度允许值', |
|||
field: 'cleanOfRollPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '分切车间洁净度允许值', |
|||
field: 'cleanOfSlitPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '卷绕或者叠片车间洁净度允许值', |
|||
field: 'cleanOfStackPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '一次注液车间洁净度允许值', |
|||
field: 'cleanOfPriInjectPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成前静置车间洁净度允许值', |
|||
field: 'cOfPreStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成车间洁净度允许值', |
|||
field: 'clOfStandPlant', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '化成后静置车间洁净度允许值', |
|||
field: 'cleanOfAftStandPlant', |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CellEnv.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CellEnv.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="formsSuccess" |
|||
:rules="CellEnvRules" |
|||
:formAllSchemas="CellEnv.allSchemas" |
|||
:apiUpdate="CellEnvApi.updateCellEnv" |
|||
:apiCreate="CellEnvApi.createCellEnv" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="CellEnv.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-env/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CellEnv,CellEnvRules } from './cellEnv.data' |
|||
import * as CellEnvApi from '@/api/battery/cellEnv' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'CellEnv' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CellEnv.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CellEnvApi.getCellEnvPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:cellEnv:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellEnv:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:cellEnv: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:'battery:cellEnv:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'battery:cellEnv: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =CellEnv.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await CellEnvApi.createCellEnv(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await CellEnvApi.updateCellEnv(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellEnv') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CellEnvApi.deleteCellEnv(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 CellEnvApi.exportCellEnv(tableObject.params) |
|||
download.excel(data, 'battery_cell_env.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_env导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await CellEnvApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,64 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CellPassRules = reactive({ |
|||
}) |
|||
|
|||
export const CellPass = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: 'id',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '直通率允许值', |
|||
field: 'passPer', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '关键设备清单', |
|||
field: 'equAbnList', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '关键设备异常报警次数允许值', |
|||
field: 'equAbnAlarm', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '环境异常报警次数允许值', |
|||
field: 'environAbnoralarm', |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CellPass.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CellPass.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="formsSuccess" |
|||
:rules="CellPassRules" |
|||
:formAllSchemas="CellPass.allSchemas" |
|||
:apiUpdate="CellPassApi.updateCellPass" |
|||
:apiCreate="CellPassApi.createCellPass" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="CellPass.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-pass/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CellPass,CellPassRules } from './cellPass.data' |
|||
import * as CellPassApi from '@/api/battery/cellPass' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'CellPass' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CellPass.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CellPassApi.getCellPassPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:cellPass:create'}), // 新增 |
|||
defaultButtons.defaultImportBtn({hasPermi:'battery:cellPass:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:cellPass: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:'battery:cellPass:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'battery:cellPass: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =CellPass.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await CellPassApi.createCellPass(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await CellPassApi.updateCellPass(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellPass') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CellPassApi.deleteCellPass(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 CellPassApi.exportCellPass(tableObject.params) |
|||
download.excel(data, 'battery_cell_pass.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_pass导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await CellPassApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,130 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CellPlateRules = reactive({ |
|||
}) |
|||
|
|||
export const CellPlate = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: 'id',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '正极粉料磁性物质含量允许值', |
|||
field: 'posPowrMagSub', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极粉料磁性物质含量允许值', |
|||
field: 'negPowrMagSub', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极浆料磁性物质含量允许值', |
|||
field: 'posSlurMagSub', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极浆料磁性物质含量允许值', |
|||
field: 'negSlurMagSub', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极极片单面面密度允许偏差', |
|||
field: 'posPolOneSidDen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极极片单面面密度允许偏差', |
|||
field: 'negPolOneSidDen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极极片双面面密度允许偏差', |
|||
field: 'posPolDouSidDen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极极片双面面密度允许偏差', |
|||
field: 'negPolDouSidDen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极辊压厚度允许偏差', |
|||
field: 'posColTh', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极辊压厚度允许偏差', |
|||
field: 'negColTh', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '正极极片长度允许偏差', |
|||
field: 'posPolLen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '负极极片长度允许偏差', |
|||
field: 'negPolLen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '模切分条后隔膜厚度', |
|||
field: 'diaThiAftDieSli', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '模切分条后毛刺长度允许值', |
|||
field: 'verHeiAftDieSli', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '烘烤后极片水份含量允许值', |
|||
field: 'mosConPolAftBak', |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CellPlate.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CellPlate.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="formsSuccess" |
|||
:rules="CellPlateRules" |
|||
:formAllSchemas="CellPlate.allSchemas" |
|||
:apiUpdate="CellPlateApi.updateCellPlate" |
|||
:apiCreate="CellPlateApi.createCellPlate" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="CellPlate.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-plate/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CellPlate,CellPlateRules } from './cellPlate.data' |
|||
import * as CellPlateApi from '@/api/battery/cellPlate' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'CellPlate' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CellPlate.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CellPlateApi.getCellPlatePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:cellPlate:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellPlate:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:cellPlate: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:'battery:cellPlate:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'battery:cellPlate: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =CellPlate.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await CellPlateApi.createCellPlate(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await CellPlateApi.updateCellPlate(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellPlate') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CellPlateApi.deleteCellPlate(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 CellPlateApi.exportCellPlate(tableObject.params) |
|||
download.excel(data, 'battery_cell_plate.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_plate导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await CellPlateApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,106 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CellProdRules = reactive({ |
|||
}) |
|||
|
|||
export const CellProd = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: 'id',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '盖板焊接后真空泄露值或氦气检出值允许值', |
|||
field: 'vacLeaValOrHelVal', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '密封钉焊接后氦气检出值允许值', |
|||
field: 'helDetAftWel', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '总注液量标准值', |
|||
field: 'tolInj', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '总注液量偏差百分比允许值', |
|||
field: 'tolInjPerDev', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '总重量允许值', |
|||
field: 'totWeight', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '出厂电压允许值', |
|||
field: 'facVol', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '容量允许值', |
|||
field: 'quantitative', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '交流阻抗允许值', |
|||
field: 'impAc', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '电芯长度允许值', |
|||
field: 'celLen', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '电芯宽度允许值', |
|||
field: 'celWid', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '电芯厚度允许值', |
|||
field: 'celThi', |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CellProd.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CellProd.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="formsSuccess" |
|||
:rules="CellProdRules" |
|||
:formAllSchemas="CellProd.allSchemas" |
|||
:apiUpdate="CellProdApi.updateCellProd" |
|||
:apiCreate="CellProdApi.createCellProd" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="CellProd.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-prod/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CellProd,CellProdRules } from './cellProd.data' |
|||
import * as CellProdApi from '@/api/battery/cellProd' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'CellProd' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CellProd.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CellProdApi.getCellProdPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:cellProd:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellProd:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:cellProd: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:'battery:cellProd:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'battery:cellProd: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =CellProd.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await CellProdApi.createCellProd(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await CellProdApi.updateCellProd(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellProd') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CellProdApi.deleteCellProd(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 CellProdApi.exportCellProd(tableObject.params) |
|||
download.excel(data, 'battery_cell_prod.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_prod导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await CellProdApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,250 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="Monomer.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="Monomer.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,$index }"> |
|||
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="formsSuccess" |
|||
:rules="MonomerRules" |
|||
:formAllSchemas="Monomer.allSchemas" |
|||
:apiUpdate="MonomerApi.updateMonomer" |
|||
:apiCreate="MonomerApi.createMonomer" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="Monomer.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/battery/cell-device/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { Monomer,MonomerRules } from './monomer.data' |
|||
import * as MonomerApi from '@/api/battery/monomer' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
import {defaultAddStaticBtn} from "@/utils/disposition/defaultButtons"; |
|||
|
|||
defineOptions({ name: 'CellDevice' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(Monomer.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: MonomerApi.getMonomerPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
defaultButtons.defaultAddStaticBtn({hasPermi:'battery:monomer:update'}), // 新增 |
|||
defaultButtons.defaultAddBtn({hasPermi:'battery:monomer:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'battery:cellDevice:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'battery:monomer: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 = (row,$index) => { |
|||
|
|||
return [ |
|||
defaultButtons.mainListEditBtn({hasPermi:'battery:monomer:update'}), // 编辑 |
|||
defaultButtons.mainListReleaseBtn({hide:(row.release =='0' || row.type !='static'),hasPermi:'battery:monomer:update'}), // 发布 |
|||
defaultButtons.mainListDeleteBtn({hide:row.type =='static' ,hasPermi:'battery:monomer: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =Monomer.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await MonomerApi.createMonomer(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await MonomerApi.updateMonomer(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCellDevice') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await MonomerApi.deleteMonomer(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 MonomerApi.exportMonomer(tableObject.params) |
|||
download.excel(data, 'battery_cell_device.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'battery_cell_device导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await MonomerApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,536 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const MonomerRules = reactive({ |
|||
}) |
|||
|
|||
export const Monomer = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
{ |
|||
label: '数据类型', |
|||
field: 'type', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
// form: {
|
|||
// component: 'InputNumber',
|
|||
// value: 0
|
|||
// },
|
|||
dictType: DICT_TYPE.BATTERY_TYPE, |
|||
dictClass: 'string', |
|||
isTable: true, |
|||
tableForm: { |
|||
type: 'Select' |
|||
} |
|||
}, |
|||
{ |
|||
label: '版本号', |
|||
field: 'version', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '作者', |
|||
field: 'author', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '产线名称', |
|||
field: 'name', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '报送时间', |
|||
field: 'date', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '数据报送时间', |
|||
field: 'timeStamp', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '工作控制号', |
|||
field: 'workNo', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '试验结束时间', |
|||
field: 'endTime', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '实际生产周期', |
|||
field: 'actCycle', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '产线ID', |
|||
field: 'plineId', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '产品型号', |
|||
field: 'ptype', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '检测类型', |
|||
field: 'testType', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '工艺流程图', |
|||
field: 'procImage', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '报检说明', |
|||
field: 'workRemark', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '工艺流程说明', |
|||
field: 'procRemark', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
// {
|
|||
// label: '一次注液',
|
|||
// field: 'oneInjectPreCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '二次注液',
|
|||
// field: 'twoInjectPreCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极涂布面密度',
|
|||
// field: 'posCoatDenCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极涂布面密度',
|
|||
// field: 'negCoatDenCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极辊压厚度',
|
|||
// field: 'posRollThickCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极辊压厚度',
|
|||
// field: 'negRollThickCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '第一次注液量',
|
|||
// field: 'oneInjectCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '最终注液保有量',
|
|||
// field: 'finalInjectRetenCpk',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
//
|
|||
// {
|
|||
// label: '一次注液车间温度',
|
|||
// field: 'temOfPriinjectPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成前静置车间温度',
|
|||
// field: 'temOfPreStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成车间温度',
|
|||
// field: 'temOfStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成后静置车间温度',
|
|||
// field: 'temOfAftStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '二次注液车间温度',
|
|||
// field: 'temOfSecinjectPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '分容前静置车间温度',
|
|||
// field: 'tempOfBefVolSepPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '分容车间温度',
|
|||
// field: 'tempOfVolSepPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '组装车间湿度',
|
|||
// field: 'humOfVolAssPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '一次注液车间湿度(露点)',
|
|||
// field: 'humOfPriinjectPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成前静置车间湿度(露点)',
|
|||
// field: 'humOfPreStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成车间湿度(露点)',
|
|||
// field: 'humOfStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成后静置车间湿度(露点)',
|
|||
// field: 'humOfAftStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '二次注液车间湿度(露点)',
|
|||
// field: 'humOfSecinjectPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '分容前静置车间湿度',
|
|||
// field: 'humpOfBefVolSepPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '分容车间湿度',
|
|||
// field: 'humpOfVolSepPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '洁净度粉尘粒径',
|
|||
// field: 'standardOfClean',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '涂布车间洁净度',
|
|||
// field: 'cleanOfCoatPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '辊压车间洁净度',
|
|||
// field: 'cleanOfRollPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '分切车间洁净度',
|
|||
// field: 'cleanOfSlitPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '卷绕或者叠片车间洁净度',
|
|||
// field: 'cleanOfStackPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '一次注液车间洁净度',
|
|||
// field: 'cleanOfPriInjectPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成前静置车间洁净度',
|
|||
// field: 'cOfPreStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成车间洁净度',
|
|||
// field: 'clOfStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '化成后静置车间洁净度',
|
|||
// field: 'cleanOfAftStandPlant',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
//
|
|||
// {
|
|||
// label: '正极粉料磁性物质含量',
|
|||
// field: 'posPowrMagSub',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极粉料磁性物质含量',
|
|||
// field: 'negPowrMagSub',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极浆料磁性物质含量',
|
|||
// field: 'posSlurMagSub',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极浆料磁性物质含量',
|
|||
// field: 'negSlurMagSub',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极极片单面面密度',
|
|||
// field: 'posPolOneSidDen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极极片单面面密度',
|
|||
// field: 'negPolOneSidDen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极极片双面面密度',
|
|||
// field: 'posPolDouSidDen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极极片双面面密度',
|
|||
// field: 'negPolDouSidDen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极辊压厚度',
|
|||
// field: 'posColTh',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极辊压厚度',
|
|||
// field: 'negColTh',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '正极极片长度',
|
|||
// field: 'posPolLen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '负极极片长度',
|
|||
// field: 'negPolLen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '模切分条后隔膜厚度',
|
|||
// field: 'diaThiAftDieSli',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '模切分条后毛刺长度',
|
|||
// field: 'verHeiAftDieSli',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '烘烤后极片水份含量',
|
|||
// field: 'mosConPolAftBak',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
//
|
|||
// {
|
|||
// label: 'A卷芯或叠芯厚度',
|
|||
// field: 'acoreThi',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: 'A卷芯或叠芯宽度',
|
|||
// field: 'acoreWid',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: 'B卷芯或叠芯厚度',
|
|||
// field: 'bcoreThi',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: 'B卷芯或叠芯宽度',
|
|||
// field: 'bcoreWid',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
//
|
|||
// {
|
|||
// label: '盖板焊接后真空泄露值或氦气检出值',
|
|||
// field: 'vacLeaValOrHelVal',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '密封钉焊接后氦气检出值',
|
|||
// field: 'helDetAftWel',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '总注液量标准值',
|
|||
// field: 'tolInj',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '总注液量偏差百分比',
|
|||
// field: 'tolInjPerDev',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '总重量',
|
|||
// field: 'totWeight',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '出厂电压',
|
|||
// field: 'facVol',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '容量',
|
|||
// field: 'quantitative',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '交流阻抗',
|
|||
// field: 'impAc',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '电芯长度',
|
|||
// field: 'celLen',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '电芯宽度',
|
|||
// field: 'celWid',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '电芯厚度',
|
|||
// field: 'celThi',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
//
|
|||
// {
|
|||
// label: '直通率',
|
|||
// field: 'passPer',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '关键设备清单',
|
|||
// field: 'equAbnList',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '关键设备异常报警次数',
|
|||
// field: 'equAbnAlarm',
|
|||
// sort: 'custom',
|
|||
// isSearch: false,
|
|||
// },
|
|||
// {
|
|||
// label: '环境异常报警次数',
|
|||
// field: 'environAbnoralarm',
|
|||
// 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,70 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const EqBakeRules = reactive({ |
|||
}) |
|||
|
|||
export const EqBake = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '设备编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="EqBake.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="EqBake.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="formsSuccess" |
|||
:rules="EqBakeRules" |
|||
:formAllSchemas="EqBake.allSchemas" |
|||
:apiUpdate="EqBakeApi.updateEqBake" |
|||
:apiCreate="EqBakeApi.createEqBake" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="EqBake.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/ccwin/eq-bake/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { EqBake,EqBakeRules } from './eqBake.data' |
|||
import * as EqBakeApi from '@/api/ccwin/eqBake' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'EqBake' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(EqBake.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: EqBakeApi.getEqBakePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn({hasPermi:'wms:eqBake:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:eqBake:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'ccwin:eqBake: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:eqBake:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'wms:eqBake: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =EqBake.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await EqBakeApi.createEqBake(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await EqBakeApi.updateEqBake(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicEqBake') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await EqBakeApi.deleteEqBake(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 EqBakeApi.exportEqBake(tableObject.params) |
|||
download.excel(data, '真空烘烤.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '真空烘烤导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await EqBakeApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,70 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const EqRollWeldingRules = reactive({ |
|||
}) |
|||
|
|||
export const EqRollWelding = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '设备编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
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,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="EqRollWelding.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="EqRollWelding.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="formsSuccess" |
|||
:rules="EqRollWeldingRules" |
|||
:formAllSchemas="EqRollWelding.allSchemas" |
|||
:apiUpdate="EqRollWeldingApi.updateEqRollWelding" |
|||
:apiCreate="EqRollWeldingApi.createEqRollWelding" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="EqRollWelding.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/ccwin/eq-roll-welding/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { EqRollWelding,EqRollWeldingRules } from './eqRollWelding.data' |
|||
import * as EqRollWeldingApi from '@/api/ccwin/eqRollWelding' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'EqRollWelding' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(EqRollWelding.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: EqRollWeldingApi.getEqRollWeldingPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn({hasPermi:'wms:eqRollWelding:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:eqRollWelding:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'ccwin:eqRollWelding: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:eqRollWelding:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'wms:eqRollWelding: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =EqRollWelding.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await EqRollWeldingApi.createEqRollWelding(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await EqRollWeldingApi.updateEqRollWelding(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicEqRollWelding') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await EqRollWeldingApi.deleteEqRollWelding(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 EqRollWeldingApi.exportEqRollWelding(tableObject.params) |
|||
download.excel(data, '辊焊机.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '辊焊机导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await EqRollWeldingApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,244 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="PaNmp.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="PaNmp.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="formsSuccess" |
|||
:rules="PaNmpRules" |
|||
:formAllSchemas="PaNmp.allSchemas" |
|||
:apiUpdate="PaNmpApi.updatePaNmp" |
|||
:apiCreate="PaNmpApi.createPaNmp" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
<!-- 详情 --> |
|||
<Detail ref="detailRef" :isBasic="true" :allSchemas="PaNmp.allSchemas" /> |
|||
|
|||
<!-- 导入 --> |
|||
<ImportForm ref="importFormRef" url="/ccwin/pa-nmp/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { PaNmp,PaNmpRules } from './paNmp.data' |
|||
import * as PaNmpApi from '@/api/ccwin/paNmp' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|||
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|||
import Detail from '@/components/Detail/src/Detail.vue' |
|||
|
|||
defineOptions({ name: 'PaNmp' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(PaNmp.allSchemas.tableColumns) |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: PaNmpApi.getPaNmpPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn({hasPermi:'wms:paNmp:create'}), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:paNmp:import'}), // 导入 |
|||
defaultButtons.defaultExportBtn({hasPermi:'ccwin:paNmp:query'}), // 导出 |
|||
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:paNmp:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'wms:paNmp: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) |
|||
} |
|||
|
|||
// form表单提交 |
|||
const formsSuccess = async (formType,data) => { |
|||
var isHave =PaNmp.allSchemas.formSchema.some(function (item) { |
|||
return item.field === 'activeTime' || item.field === 'expireTime'; |
|||
}); |
|||
if(isHave){ |
|||
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ |
|||
message.error('失效时间要大于生效时间') |
|||
return; |
|||
} |
|||
} |
|||
if(data.activeTime==0)data.activeTime = null; |
|||
if(data.expireTime==0)data.expireTime = null; |
|||
if (formType === 'create') { |
|||
await PaNmpApi.createPaNmp(data) |
|||
message.success(t('common.createSuccess')) |
|||
} else { |
|||
await PaNmpApi.updatePaNmp(data) |
|||
message.success(t('common.updateSuccess')) |
|||
} |
|||
basicFormRef.value.dialogVisible = false |
|||
getList() |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicPaNmp') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await PaNmpApi.deletePaNmp(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 PaNmpApi.exportPaNmp(tableObject.params) |
|||
download.excel(data, 'NMP回收.xlsx') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: 'NMP回收导入模版.xlsx' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await PaNmpApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,70 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const PaNmpRules = reactive({ |
|||
}) |
|||
|
|||
export const PaNmp = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '设备编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
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'
|
|||
// }
|
|||
} |
|||
])) |
Loading…
Reference in new issue