|
@@ -103,8 +103,8 @@
|
|
|
|
|
|
<a-divider type="vertical" />
|
|
|
|
|
|
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否">
|
|
|
- <a href="javascript:void(0);" @click="delAnn(record.id)" class="delRed"> 删除 </a>
|
|
|
+ <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="delAnn(record)">
|
|
|
+ <a href="javascript:void(0);" class="delRed"> 删除 </a>
|
|
|
</a-popconfirm>
|
|
|
</span>
|
|
|
</a-table>
|
|
@@ -117,7 +117,12 @@
|
|
|
|
|
|
<script>
|
|
|
import AddAnnModal from '@views/oa/enter-ann/add/addAnnModal.vue'
|
|
|
-import { enterpriseEList, enterpriseEQueryById, enterpriseEReleseUpdate } from '@api/oa/cd-enterprise-announcement'
|
|
|
+import {
|
|
|
+ enterpriseEList,
|
|
|
+ enterpriseEQueryById,
|
|
|
+ enterpriseEReleseUpdate,
|
|
|
+ enterpriseEDelete
|
|
|
+} from '@api/oa/cd-enterprise-announcement'
|
|
|
export default {
|
|
|
name: 'EnterpriseAnnouncement', // 企业公告
|
|
|
|
|
@@ -232,28 +237,25 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // 批量删除
|
|
|
- batchDel () {},
|
|
|
- // 清空
|
|
|
- onClearSelected () {},
|
|
|
- // ??
|
|
|
- modalFormOk () {},
|
|
|
- // 分页、排序、筛选变化时触发
|
|
|
- handleTableChange (pagination, filters, sorter) {
|
|
|
- // console.log('当前页信息>>>>',pagination)
|
|
|
- this.queryParam.pageNo = pagination.current
|
|
|
- this.getAnnList()
|
|
|
- },
|
|
|
-
|
|
|
// 发布
|
|
|
sendAnn (id) {
|
|
|
- // console.log('点击了发布')
|
|
|
enterpriseEReleseUpdate({ id: id, isRelease: '1' }).then(res => {
|
|
|
console.log(res)
|
|
|
this.$message.success('发布成功')
|
|
|
this.getAnnList()
|
|
|
})
|
|
|
},
|
|
|
+ // 删除公告
|
|
|
+ delAnn (record) {
|
|
|
+ console.log('点击公告对象', record)
|
|
|
+ enterpriseEDelete({ id: record.id }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log(res)
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.getAnnList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 取消发布
|
|
|
saveAnn (id) {
|
|
|
console.log('点击了取消发布')
|
|
@@ -263,9 +265,18 @@ export default {
|
|
|
this.getAnnList() // 渲染公告
|
|
|
})
|
|
|
},
|
|
|
- // 操作 删除
|
|
|
- delAnn () {
|
|
|
- console.log('点击了删除,需要发请求、确定提示、重新渲染')
|
|
|
+
|
|
|
+ // 批量删除
|
|
|
+ batchDel () {},
|
|
|
+ // 清空
|
|
|
+ onClearSelected () {},
|
|
|
+ // ??
|
|
|
+ modalFormOk () {},
|
|
|
+ // 分页、排序、筛选变化时触发
|
|
|
+ handleTableChange (pagination, filters, sorter) {
|
|
|
+ // console.log('当前页信息>>>>',pagination)
|
|
|
+ this.queryParam.pageNo = pagination.current
|
|
|
+ this.getAnnList()
|
|
|
}
|
|
|
},
|
|
|
computed: {
|