Commit 45b75887 by 温丽香

参数模板序号问题

1 parent 4345db1b
Pipeline #3876 passed
in 1 minute 52 seconds
Showing with 9 additions and 3 deletions
......@@ -100,7 +100,7 @@ export default {
definitions: [
{
label: '序号',
render: 'number'
render: 'order'
},
{
label: '名称',
......@@ -132,7 +132,10 @@ export default {
this.loadingOne = true
const oneLevel = await getParameter({ base: 1, pages: this.oneCurrentPage - 1, pagesize: 10 })
if (oneLevel && oneLevel.data && oneLevel.data.code === 0) {
this.oneList = oneLevel.data.parameters.datas
this.oneList = oneLevel.data.parameters.datas.map((item, index) => {
item.order = index + 1 + (this.oneCurrentPage - 1) * 10
return item
})
this.oneTotal = oneLevel.data.parameters.total
}
this.loadingOne = false
......@@ -141,7 +144,10 @@ export default {
this.loadingTwo = true
const twoLevel = await getParameter({ parent: this.parentLevel, pages: this.twoCurrentPage - 1, pagesize: 10 })
if (twoLevel && twoLevel.data && twoLevel.data.code === 0) {
this.twoList = twoLevel.data.parameters.datas
this.twoList = twoLevel.data.parameters.datas.map((item, index) => {
item.order = index + 1 + (this.twoCurrentPage - 1) * 10
return item
})
this.twoTotal = twoLevel.data.parameters.total
}
this.loadingTwo = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!