|
|
|
@ -31,25 +31,22 @@ |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50"></el-table-column> |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column prop="noticeTitle" |
|
|
|
label="通知标题" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
align="center" |
|
|
|
width="350"></el-table-column> |
|
|
|
<el-table-column prop="deptName" |
|
|
|
label="发布通知部门" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column prop="noticeReleaseState" |
|
|
|
label="已发布" |
|
|
|
label="通知所属部门" |
|
|
|
header-align="center" |
|
|
|
:formatter="showIsPublishFormatter" |
|
|
|
align="center"></el-table-column> |
|
|
|
align="center" |
|
|
|
:formatter="showDeptNameFormatter"></el-table-column> |
|
|
|
<el-table-column prop="readingAmount" |
|
|
|
label="阅读量" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
align="center" |
|
|
|
width="100"></el-table-column> |
|
|
|
<el-table-column prop="creatorName" |
|
|
|
label="创建人" |
|
|
|
header-align="center" |
|
|
|
@ -58,6 +55,16 @@ |
|
|
|
label="创建时间" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column prop="noticeReleaseState" |
|
|
|
label="已发布" |
|
|
|
header-align="center" |
|
|
|
:formatter="showIsPublishFormatter" |
|
|
|
align="center" |
|
|
|
width="100"></el-table-column> |
|
|
|
<el-table-column prop="releaseTime" |
|
|
|
label="发布时间" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column :label="$t('handle')" |
|
|
|
fixed="right" |
|
|
|
header-align="center" |
|
|
|
@ -120,18 +127,24 @@ export default { |
|
|
|
methods: { |
|
|
|
// 发布通知 |
|
|
|
noticePublishHandle (id) { |
|
|
|
this.$http.post(`/news/notice/publish/${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() |
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': '发布' }), this.$t('发布'), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http.post(`/news/notice/publish/${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(() => { }) |
|
|
|
}, |
|
|
|
showIsPublishFormatter: function (row, column) { |
|
|
|
@ -139,6 +152,17 @@ export default { |
|
|
|
return '否' |
|
|
|
} |
|
|
|
return '是' |
|
|
|
}, |
|
|
|
showDeptNameFormatter: function (row, column) { |
|
|
|
if (row.grid) { |
|
|
|
return row.grid |
|
|
|
} |
|
|
|
if (row.community) { |
|
|
|
return row.community |
|
|
|
} |
|
|
|
if (row.street) { |
|
|
|
return row.street |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|