Commit f2a1f08b by huyue

Merge branch 'SAAS+V4.49.0-0121' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.49.0-0121
2 parents b0738cc0 65da8144
...@@ -194,7 +194,7 @@ export default { ...@@ -194,7 +194,7 @@ export default {
prop: '', prop: '',
width: 100, width: 100,
formatter: (row) => { formatter: (row) => {
return row.allocationType == 5 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 6 ? `${row.outputCommissionRatio}%×1` : '-' return row.allocationType == 6 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 5 ? `${row.calculateValue}%×1` : '-'
} }
}, },
{ {
......
...@@ -142,7 +142,25 @@ export default { ...@@ -142,7 +142,25 @@ export default {
this.tableData = res.list this.tableData = res.list
this.total = res.total this.total = res.total
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
this.tableData = this.tableData.map(item => { // this.tableData = this.tableData.map(item => {
// if (item.createdDate) {
// item.createdDateStr = Util.dateFormate(item.createdDate, 'YYYY-MM-DD HH:mm:ss')
// }
// if (item.updatedDate) {
// item.updatedDateStr = Util.dateFormate(item.updatedDate, 'YYYY-MM-DD HH:mm:ss')
// }
// item.systemCategoryStr = item.systemCategory == '1' ? '是' : '否'
// return item
// })
this.tableData = this.getNewTree(this.tableData)
}
})
},
// 递归遍历树,通过map遍历直接修改原数组数据,数组其他的数据不变
getNewTree(obj) {
obj.map(item => {
if (item.createdDate) { if (item.createdDate) {
item.createdDateStr = Util.dateFormate(item.createdDate, 'YYYY-MM-DD HH:mm:ss') item.createdDateStr = Util.dateFormate(item.createdDate, 'YYYY-MM-DD HH:mm:ss')
} }
...@@ -150,10 +168,13 @@ export default { ...@@ -150,10 +168,13 @@ export default {
item.updatedDateStr = Util.dateFormate(item.updatedDate, 'YYYY-MM-DD HH:mm:ss') item.updatedDateStr = Util.dateFormate(item.updatedDate, 'YYYY-MM-DD HH:mm:ss')
} }
item.systemCategoryStr = item.systemCategory == '1' ? '是' : '否' item.systemCategoryStr = item.systemCategory == '1' ? '是' : '否'
return item if (item.children && item.children.length > 0) {
}) console.log('item.children', item.children)
this.getNewTree(item.children)
} }
}) })
console.log('obj', obj)
return obj
}, },
// 每页条数 // 每页条数
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!