tapd相关修改更新
This commit is contained in:
@@ -210,18 +210,14 @@
|
||||
*/
|
||||
async function getdetails(id) {
|
||||
const res = await getPrinterDetail({id: id})
|
||||
if (res.categoryIds) {
|
||||
let arr = res.categoryIds.split(',')
|
||||
if (res.categoryList) {
|
||||
let arrs = []
|
||||
console.log(arrs)
|
||||
arr.forEach(eles => {
|
||||
res.categoryList.forEach(eles => {
|
||||
arrs.push(eles)
|
||||
})
|
||||
res.selectcheckbox = arrs
|
||||
}
|
||||
form = Object.assign(form, res)
|
||||
console.log(res)
|
||||
console.log(form)
|
||||
form.printType = JSON.parse(form.printType)
|
||||
}
|
||||
|
||||
@@ -257,9 +253,12 @@
|
||||
idstr += element + ','
|
||||
arr.push(pageData.partList.filter(ele => ele.id == element)[0])
|
||||
})
|
||||
console.log(form.selectcheckbox)
|
||||
form.categoryIds = idstr.substring(0, idstr.length - 1)
|
||||
form.categoryIds = JSON.stringify(form.selectcheckbox)
|
||||
form.categoryList = JSON.stringify(arr)
|
||||
}
|
||||
delete form.selectcheckbox;
|
||||
form.printType = JSON.stringify(form.printType)
|
||||
if (form.id) {
|
||||
delete form.createdAt
|
||||
|
||||
Reference in New Issue
Block a user