From 06f7db7ce0c1160cb3234cd30f5c053abd25bb45 Mon Sep 17 00:00:00 2001 From: dodosophia <376697534@qq.com> Date: Mon, 29 Jun 2020 15:51:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?add=20Feature=EF=BC=9A=20=20=20Show=20snaps?= =?UTF-8?q?hot,=20storage=20channel=20info=20=20=20Support=20export=20snap?= =?UTF-8?q?shot=20to=20add=20to=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api.js | 5 +- .../src/components/event/EventInspector.vue | 3 + .../src/components/form/AttachmentItem.vue | 6 +- .../{FileModal.vue => AttachmentModal.vue} | 24 +++++-- .../src/components/form/AttachmentsList.vue | 18 +++++- frontend/src/components/form/BugItForm.vue | 6 +- frontend/src/components/form/SnapshotItem.vue | 24 +++++++ frontend/src/store/event.js | 4 +- frontend/src/store/form.js | 63 ++++++++++--------- lyrebird_bugit/apis.py | 6 +- lyrebird_bugit/attachment.py | 23 +++++++ setup.py | 2 +- 12 files changed, 138 insertions(+), 46 deletions(-) rename frontend/src/components/form/{FileModal.vue => AttachmentModal.vue} (73%) create mode 100644 frontend/src/components/form/SnapshotItem.vue create mode 100644 lyrebird_bugit/attachment.py diff --git a/frontend/src/api.js b/frontend/src/api.js index 06286a5..958a26f 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -54,14 +54,15 @@ export const saveImage = (id, imageData) => { }) } -export const createIssue = (templateInfo, issue, attachments) => { +export const createIssue = (templateInfo, issue, attachments, snapshots) => { return axios({ url: API_PREFIX + '/issue', method: 'POST', data: { template: templateInfo, issue, - attachments + attachments, + snapshots } }) } diff --git a/frontend/src/components/event/EventInspector.vue b/frontend/src/components/event/EventInspector.vue index 9c7a524..997ba76 100644 --- a/frontend/src/components/event/EventInspector.vue +++ b/frontend/src/components/event/EventInspector.vue @@ -172,6 +172,9 @@ export default { message: eventObj.message }) } + if (eventObj.snapshot) { + this.$bus.$emit('addSnapshot', eventObj) + } if (eventObj.attachments) { this.$bus.$emit('addAttachments', eventObj.attachments) } diff --git a/frontend/src/components/form/AttachmentItem.vue b/frontend/src/components/form/AttachmentItem.vue index ebcb94d..7b15349 100644 --- a/frontend/src/components/form/AttachmentItem.vue +++ b/frontend/src/components/form/AttachmentItem.vue @@ -1,7 +1,7 @@