diff --git a/src/api/journal.js b/src/api/journal.js
index 0f18cf54..61a3ced8 100644
--- a/src/api/journal.js
+++ b/src/api/journal.js
@@ -28,4 +28,11 @@ journalApi.update = (journalId, journal) => {
})
}
+journalApi.delete = journalId => {
+ return service({
+ url: `${baseUrl}/${journalId}`,
+ method: 'delete'
+ })
+}
+
export default journalApi
diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue
index b6b300a2..6b612045 100644
--- a/src/views/sheet/internal/JournalList.vue
+++ b/src/views/sheet/internal/JournalList.vue
@@ -87,7 +87,14 @@
@click="handleEdit(item)"
>编辑
- 删除
+
+ 删除
+
{{ item.createTime | moment }}
@@ -193,6 +200,12 @@ export default {
this.journal = item
this.visible = true
},
+ handleDelete(id) {
+ journalApi.delete(id).then(response => {
+ this.$message.success('删除成功!')
+ this.loadJournals()
+ })
+ },
createOrUpdateJournal() {
if (this.journal.id) {
journalApi.update(this.journal.id, this.journal).then(response => {