Browse Source

添加数据

master
wangyufei 1 month ago
parent
commit
a35a5b37dc
  1. 4
      src/views/battery/cellCore/cellCore.data.ts
  2. 5
      src/views/battery/cellDevice/cellDevice.data.ts
  3. 4
      src/views/battery/cellEnv/cellEnv.data.ts
  4. 4
      src/views/battery/cellPass/cellPass.data.ts
  5. 4
      src/views/battery/cellPlate/cellPlate.data.ts
  6. 128
      src/views/battery/monomer/index.vue

4
src/views/battery/cellCore/cellCore.data.ts

@ -59,6 +59,7 @@ export const CellCore = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
isTableForm:false
}, },
{ {
label: '操作', label: '操作',
@ -67,6 +68,7 @@ export const CellCore = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm:false
} }
])) ]))

5
src/views/battery/cellDevice/cellDevice.data.ts

@ -74,7 +74,7 @@ export const CellDevice = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false, isTableForm:false
}, },
{ {
label: '操作', label: '操作',
@ -83,6 +83,7 @@ export const CellDevice = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm:false
} }
])) ]))

4
src/views/battery/cellEnv/cellEnv.data.ts

@ -171,6 +171,7 @@ export const CellEnv = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
isTableForm:false
}, },
{ {
label: '操作', label: '操作',
@ -179,6 +180,7 @@ export const CellEnv = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm:false
} }
])) ]))

4
src/views/battery/cellPass/cellPass.data.ts

@ -51,6 +51,7 @@ export const CellPass = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
isTableForm:false
}, },
{ {
label: '操作', label: '操作',
@ -59,6 +60,7 @@ export const CellPass = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm:false
} }
])) ]))

4
src/views/battery/cellPlate/cellPlate.data.ts

@ -117,6 +117,7 @@ export const CellPlate = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
isTableForm:false
}, },
{ {
label: '操作', label: '操作',
@ -125,6 +126,7 @@ export const CellPlate = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm:false
} }
])) ]))

128
src/views/battery/monomer/index.vue

@ -440,61 +440,107 @@ const isStatic = ref(true)
const addTableType = ref('') const addTableType = ref('')
const handleAddTable = (type)=>{ const handleAddTable = (type)=>{
addTableType.value = type addTableType.value = type
let allSchemas = CellDevice.allSchemas
let apiPage = CellDeviceApi.getCellDevicePage
let tableTitle = ''
if(type == 'Device'){ if(type == 'Device'){
// //
tableTitle = '单体产线设备' let tableFormKeys = {}
allSchemas = CellDevice.allSchemas CellDevice.allSchemas.tableFormColumns.forEach(item => {
apiPage = CellDeviceApi.getCellDevicePage tableFormKeys[item.field] = item.default ? item.default : ''
})
tableDataDevice.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}else if(type == 'Env'){ }else if(type == 'Env'){
// //
tableTitle = '单体产线环境' let tableFormKeys = {}
allSchemas = CellEnv.allSchemas CellEnv.allSchemas.tableFormColumns.forEach(item => {
apiPage = CellEnvApi.getCellEnvPage tableFormKeys[item.field] = item.default ? item.default : ''
})
tableDataEnv.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}else if(type == 'Plate'){ }else if(type == 'Plate'){
// //
tableTitle = '单体极片' let tableFormKeys = {}
allSchemas = CellPlate.allSchemas CellPlate.allSchemas.tableFormColumns.forEach(item => {
apiPage = CellPlateApi.getCellPlatePage tableFormKeys[item.field] = item.default ? item.default : ''
})
tableDataPlate.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}else if(type == 'Core'){ }else if(type == 'Core'){
// //
tableTitle = '单体卷芯或叠芯' let tableFormKeys = {}
allSchemas = CellCore.allSchemas CellCore.allSchemas.tableFormColumns.forEach(item => {
apiPage = CellCoreApi.getCellCorePage tableFormKeys[item.field] = item.default ? item.default : ''
})
tableDataCore.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}else if(type == 'Prod'){ }else if(type == 'Prod'){
// //
tableTitle = '单体产品' let tableFormKeys = {}
allSchemas = CellProd.allSchemas CellProd.allSchemas.tableFormColumns.forEach(item => {
apiPage = CellProdApi.getCellProdPage tableFormKeys[item.field] = item.default ? item.default : ''
})
tableDataProd.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}else if(type == 'Pass'){ }else if(type == 'Pass'){
// //
tableTitle = '单体直通率' let tableFormKeys = {}
allSchemas = CellPass.allSchemas CellPass.allSchemas.tableFormColumns.forEach(item => {
apiPage = CellPassApi.getCellPassPage tableFormKeys[item.field] = item.default ? item.default : ''
})
tableDataPass.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} }
searchTableRef.value.open(
tableTitle,
allSchemas,
apiPage,
"hahaha",
"hahaha",
!isStatic.value,
'tableForm',
null,
{
//
// supplierCode:formRef.value.formRef.formModel.supplierCode,
// itemCode:formRef.value.formRef.formModel.itemCode
},
undefined,
false,
undefined
)
} }
// const handleAddTable = (type)=>{
// addTableType.value = type
// let allSchemas = CellDevice.allSchemas
// let apiPage = CellDeviceApi.getCellDevicePage
// let tableTitle = ''
// if(type == 'Device'){
// //
// tableTitle = '线'
// allSchemas = CellDevice.allSchemas
// apiPage = CellDeviceApi.getCellDevicePage
// }else if(type == 'Env'){
// //
// tableTitle = '线'
// allSchemas = CellEnv.allSchemas
// apiPage = CellEnvApi.getCellEnvPage
// }else if(type == 'Plate'){
// //
// tableTitle = ''
// allSchemas = CellPlate.allSchemas
// apiPage = CellPlateApi.getCellPlatePage
// }else if(type == 'Core'){
// //
// tableTitle = ''
// allSchemas = CellCore.allSchemas
// apiPage = CellCoreApi.getCellCorePage
// }else if(type == 'Prod'){
// //
// tableTitle = ''
// allSchemas = CellProd.allSchemas
// apiPage = CellProdApi.getCellProdPage
// }else if(type == 'Pass'){
// //
// tableTitle = ''
// allSchemas = CellPass.allSchemas
// apiPage = CellPassApi.getCellPassPage
// }
// searchTableRef.value.open(
// tableTitle,
// allSchemas,
// apiPage,
// "hahaha",
// "hahaha",
// !isStatic.value,
// 'tableForm',
// null,
// {
// //
// // supplierCode:formRef.value.formRef.formModel.supplierCode,
// // itemCode:formRef.value.formRef.formModel.itemCode
// },
// undefined,
// false,
// undefined
// )
// }
// //
const handleDeleteTable = (item, index, type) => { const handleDeleteTable = (item, index, type) => {
if(type == 'Device'){ if(type == 'Device'){

Loading…
Cancel
Save