|
|
@ -149,7 +149,7 @@ |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50"> |
|
|
|
width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-if="scope.row.bannerFlag === '0' " |
|
|
|
type="text" |
|
|
@ -249,7 +249,6 @@ export default { |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
changeStreet (event) { |
|
|
|
console.log(111111111111) |
|
|
|
this.dataForm.streetId = event |
|
|
|
let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0] |
|
|
|
this.initDeptIdAndName(choosenItem) |
|
|
@ -288,22 +287,48 @@ export default { |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
modifyOnLine (row) { |
|
|
|
this.onLine.id = row.id |
|
|
|
this.onLine.onLineState = '0' |
|
|
|
console.log(this.onLine) |
|
|
|
this.$http.post(`/news/news/modifyOnLine/`, this.onLine).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.getDataList() |
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': '下线' }), this.$t('下线'), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.onLine.id = row.id |
|
|
|
this.onLine.onLineState = '0' |
|
|
|
console.log(this.onLine) |
|
|
|
this.$http.post(`/news/news/modifyOnLine/`, this.onLine).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getDataList() |
|
|
|
}).catch(() => { }) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
newsToBanner (row) { |
|
|
|
this.$http.post(`/news/news/newsToBanner/` + row.id).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.getDataList() |
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': '上banner' }), this.$t('上banner'), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http.post(`/news/news/newsToBanner/` + row.id).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getDataList() |
|
|
|
}).catch(() => { }) |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
}, |
|
|
|