|
|
@@ -48,14 +48,35 @@
|
|
|
prop="adminIds"
|
|
|
label="管理员">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ getAdminName(scope.row.admins) }}
|
|
|
+ {{ getNameList(scope.row.admins, 'loginName') }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="ticketTypeIds"
|
|
|
label="票种">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ getTicketTypeNames(scope.row.ticketTypes) }}
|
|
|
+ {{ getNameList(scope.row.ticketTypes) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="scenicIds"
|
|
|
+ label="景区">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getNameList(scope.row.scenicList) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="payChannelIds"
|
|
|
+ label="支付渠道">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getNameList(scope.row.payChannelList) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="checkerIds"
|
|
|
+ label="检票设备">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getNameList(scope.row.checkerList) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -286,9 +307,9 @@ export default {
|
|
|
name: item.name,
|
|
|
adminIds: item.admins ? item.admins.map(adm => adm.id) || [] : [],
|
|
|
ticketTypeIds: item.ticketTypes ? item.ticketTypes.map(tt => tt.id) || [] : [],
|
|
|
- scenicIds: item.scenics ? item.scenics.map(sc => sc.id) || [] : [],
|
|
|
- payChannelIds: item.payChannels ? item.payChannels.map(pc => pc.id) || [] : [],
|
|
|
- checkerIds: item.checkers ? item.checkers.map(ch => ch.id) || [] : []
|
|
|
+ scenicIds: item.scenicList ? item.scenicList.map(sc => sc.id) || [] : [],
|
|
|
+ payChannelIds: item.payChannelList ? item.payChannelList.map(pc => pc.id) || [] : [],
|
|
|
+ checkerIds: item.checkerList ? item.checkerList.map(ch => ch.id) || [] : []
|
|
|
}
|
|
|
this.dialogVisible = true
|
|
|
},
|
|
|
@@ -312,13 +333,9 @@ export default {
|
|
|
this.getList()
|
|
|
})
|
|
|
},
|
|
|
- getAdminName (admins) {
|
|
|
- if (!admins) return ''
|
|
|
- return admins.map(admin => admin.loginName).join(',')
|
|
|
- },
|
|
|
- getTicketTypeNames (ticketTypes) {
|
|
|
- if (!ticketTypes) return ''
|
|
|
- return ticketTypes.map(tt => tt.name).join(',')
|
|
|
+ getNameList (list, key = 'name') {
|
|
|
+ if (!list) return ''
|
|
|
+ return list.map(item => item[key]).join(',')
|
|
|
}
|
|
|
}
|
|
|
}
|