|
|
|
@ -39,6 +39,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="bannerType" |
|
|
|
label="banner类型" |
|
|
|
:formatter="setBannerType" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column prop="state" |
|
|
|
@ -121,12 +122,18 @@ export default { |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
title: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
bannerOptions: [], |
|
|
|
positionList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
AddOrUpdate |
|
|
|
}, |
|
|
|
created () { |
|
|
|
this.getListFromDict('bannerType') |
|
|
|
this.getListFromDict('bannerPosition') |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
bannerState: function (row, column) { |
|
|
|
console.log(row.partyFlag) |
|
|
|
@ -161,6 +168,26 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
setBannerType: function (row) { |
|
|
|
this.bannerOptions.forEach(item => { |
|
|
|
console.log(item.id) |
|
|
|
if (item.id === row.bannerType) { |
|
|
|
return item.name |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getListFromDict (dictType) { |
|
|
|
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
if (dictType === 'bannerType') { |
|
|
|
this.bannerOptions = res.data |
|
|
|
} else if (dictType === 'bannerPosition') { |
|
|
|
this.positionList = res.data |
|
|
|
} |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|