持续优化
This commit is contained in:
@@ -252,8 +252,6 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Search, Refresh, Plus } from '@element-plus/icons-vue'
|
||||
import { getOtaList, createOta, updateOta, deleteOta, uploadOtaPackage } from '@/api/ota'
|
||||
|
||||
const PAW_MD5_PLACEHOLDER = '0'.repeat(32)
|
||||
|
||||
const PACKAGE_UPLOAD_MODELS = ['Luxsin-X8', 'Luxsin-X9']
|
||||
|
||||
const loading = ref(false)
|
||||
@@ -294,10 +292,6 @@ function emptyForm() {
|
||||
hw: 6,
|
||||
target: 0,
|
||||
beta: 0,
|
||||
pawVerCode: 0,
|
||||
pawVerName: '',
|
||||
pawUrl: '',
|
||||
pawMd5: '',
|
||||
status: 1
|
||||
}
|
||||
}
|
||||
@@ -344,10 +338,6 @@ const formRules = {
|
||||
}
|
||||
|
||||
function buildPayload() {
|
||||
let pawMd5 = (formData.pawMd5 || '').trim()
|
||||
if (pawMd5.length !== 32) {
|
||||
pawMd5 = PAW_MD5_PLACEHOLDER
|
||||
}
|
||||
const model = (formData.model == null || formData.model === '') ? '' : String(formData.model).trim()
|
||||
return {
|
||||
verCode: Number(formData.verCode),
|
||||
@@ -360,10 +350,6 @@ function buildPayload() {
|
||||
hw: Number(formData.hw ?? 0),
|
||||
target: Number(formData.target ?? 0),
|
||||
beta: Number(formData.beta ?? 0),
|
||||
pawVerCode: Number(formData.pawVerCode ?? 0),
|
||||
pawVerName: (formData.pawVerName || '').trim(),
|
||||
pawUrl: (formData.pawUrl || '').trim(),
|
||||
pawMd5,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
status: Number(formData.status ?? 1)
|
||||
@@ -497,10 +483,6 @@ function applyOtaRowToForm(row, isCopy) {
|
||||
hw: row.hw ?? 0,
|
||||
target: row.target ?? 0,
|
||||
beta: row.beta ?? 0,
|
||||
pawVerCode: row.pawVerCode ?? 0,
|
||||
pawVerName: row.pawVerName ?? '',
|
||||
pawUrl: row.pawUrl ?? '',
|
||||
pawMd5: row.pawMd5 || '',
|
||||
status: row.status ?? 1
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user