|
@ -83,8 +83,8 @@
|
|
|
},
|
|
|
{
|
|
|
title: '名称',
|
|
|
dataIndex: 'partnerName',
|
|
|
scopedSlots: { customRender: 'partnerName' }
|
|
|
dataIndex: 'bannerName',
|
|
|
scopedSlots: { customRender: 'bannerName' }
|
|
|
},
|
|
|
{
|
|
|
title: '图片',
|
|
@ -114,7 +114,7 @@
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
return homeApi.deleteBannerById(Object.assign(parameter, this.queryParam)).then((res) => {
|
|
|
return homeApi.findBannerById(Object.assign(parameter, this.queryParam)).then((res) => {
|
|
|
return res.data
|
|
|
})
|
|
|
},
|
|
@ -145,8 +145,9 @@
|
|
|
methods: {
|
|
|
statusFilter (status) {
|
|
|
const values = this.statusDictTypeDropDown.filter(item => item.code === status)
|
|
|
debugger
|
|
|
if (values.length > 0) {
|
|
|
return values[0].value
|
|
|
return values[0].name
|
|
|
} else {
|
|
|
return '上线'
|
|
|
}
|
|
@ -154,7 +155,7 @@
|
|
|
typeFilter (type) {
|
|
|
const values = this.typeDictTypeDropDown.filter(item => item.code === type)
|
|
|
if (values.length > 0) {
|
|
|
return values[0].value
|
|
|
return values[0].name
|
|
|
} else {
|
|
|
return '无'
|
|
|
}
|
|
@ -164,19 +165,27 @@
|
|
|
*/
|
|
|
editjobStatusStatus (code, record) {
|
|
|
if (code === 1) {
|
|
|
homeApi.updateIsLinebanner({ id: record.id, isLine: false }).then(res => {
|
|
|
if (res.success) {
|
|
|
this.$message.success('下线成功')
|
|
|
this.$refs.table.refresh()
|
|
|
homeApi.updateIsLinebanner({ id: record.bannerId, isLine: 0 }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
if (res.data) {
|
|
|
this.$message.success('下线成功')
|
|
|
this.$refs.table.refresh()
|
|
|
}else{
|
|
|
this.$message.error('下线失败')
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error('下线失败:' + res.message)
|
|
|
}
|
|
|
})
|
|
|
} else if (code === 2) {
|
|
|
homeApi.updateIsLinebanner({ id: record.id, isLine: true }).then(res => {
|
|
|
if (res.success) {
|
|
|
this.$message.success('上线成功')
|
|
|
this.$refs.table.refresh()
|
|
|
} else {
|
|
|
homeApi.updateIsLinebanner({ id: record.bannerId, isLine: 1 }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
if (res.data) {
|
|
|
this.$message.success('上线成功')
|
|
|
this.$refs.table.refresh()
|
|
|
}else{
|
|
|
this.$message.error('上线失败')
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error('上线失败:' + res.message)
|
|
|
}
|
|
@ -184,10 +193,14 @@
|
|
|
}
|
|
|
},
|
|
|
bannerIndexDelete (record) {
|
|
|
homeApi.deleteBannerById({ id: record.id }).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.$message.success('删除成功')
|
|
|
this.$refs.table.refresh()
|
|
|
homeApi.deleteBannerById({ id: record.bannerId }).then((res) => {
|
|
|
if (res.status === 200) {
|
|
|
if (res.data) {
|
|
|
this.$message.success('删除成功')
|
|
|
this.$refs.table.refresh()
|
|
|
}else{
|
|
|
this.$message.error('删除失败')
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error('删除失败:' + res.message)
|
|
|
}
|