Browse Source

Merge branch 'dev_0814' of http://121.42.41.42:7070/r/esua-epdc-admin into dev_0814

master
王金鹏 6 years ago
parent
commit
f9afc5b474
  1. 55
      src/views/modules/news/news.vue
  2. 25
      src/views/modules/news/newsdraft.vue

55
src/views/modules/news/news.vue

@ -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(() => { })
}
},

25
src/views/modules/news/newsdraft.vue

@ -261,12 +261,25 @@ export default {
},
//
publist (row) {
let id = row.id
this.$http.post(`/news/news/draftsPublishNews/${id}`).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(() => {
let id = row.id
this.$http.post(`/news/news/draftsPublishNews/${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(() => { })
}
},

Loading…
Cancel
Save