Commit 19cf1ebd authored by liwei's avatar liwei

修改了页面

parent 58e79085
...@@ -295,19 +295,21 @@ export default { ...@@ -295,19 +295,21 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => { list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.rows.map(item => { if (response.rows !== undefined){
const title = item.title this.list = response.rows.map(item => {
if (title) { const title = item.title
const temp = title.split('-') if (title) {
const systemMode = temp.filter((item, index) => { return index < temp.length - 1 }).join('-') const temp = title.split('-')
item.systemMode = systemMode const systemMode = temp.filter((item, index) => { return index < temp.length - 1 }).join('-')
item.optionName = temp[temp.length - 1] item.systemMode = systemMode
} else { item.optionName = temp[temp.length - 1]
item.systemMode = '' } else {
item.optionName = '' item.systemMode = ''
} item.optionName = ''
return item }
}) return item
})
}
this.total = response.total this.total = response.total
this.loading = false this.loading = false
} }
......
...@@ -340,19 +340,21 @@ export default { ...@@ -340,19 +340,21 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => { list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.rows.map(item => { if (response.rows !== undefined) {
const title = item.title this.list = response.rows.map(item => {
if (title) { const title = item.title
const temp = title.split('-') if (title) {
const systemMode = temp.filter((item, index) => { return index < temp.length - 1 }).join('-') const temp = title.split('-')
item.systemMode = systemMode const systemMode = temp.filter((item, index) => { return index < temp.length - 1 }).join('-')
item.optionName = temp[temp.length - 1] item.systemMode = systemMode
} else { item.optionName = temp[temp.length - 1]
item.systemMode = undefined } else {
item.optionName = undefined item.systemMode = undefined
item.optionName = undefined
}
return item
})
} }
return item
})
this.total = response.total this.total = response.total
this.loading = false this.loading = false
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment