From 2c3e80bd8f1b2555dcd49d7fc24e81d8d6aa0139 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 28 Feb 2025 21:07:54 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=B7=B2=E5=88=A0=E9=99=A4=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=94=AF=E6=8C=81=E6=8C=89=E6=A0=87=E7=AD=BE=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/manage/components/TaskDeleted.vue | 55 ++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/pages/manage/components/TaskDeleted.vue b/resources/assets/js/pages/manage/components/TaskDeleted.vue index 87683318a..209f4a114 100644 --- a/resources/assets/js/pages/manage/components/TaskDeleted.vue +++ b/resources/assets/js/pages/manage/components/TaskDeleted.vue @@ -13,7 +13,22 @@ {{$L("关键词")}}
- + +
+ +
  • +
    + {{$L("任务标签")}} +
    +
    +
  • @@ -96,6 +111,23 @@ export default { return h('AutoTip', row.name); } }, + { + title: this.$L('任务标签'), + key: 'tags', + minWidth: 100, + render: (h, {row}) => { + if (row.task_tag.length == 0) { + return h('div', '-'); + } + return h('AutoTip', { + on: { + 'on-click': () => { + this.$store.dispatch("openTask", row); + } + } + }, row.task_tag.map(({name}) => name).join('、')); + } + }, { title: this.$L('创建时间'), key: 'created_at', @@ -160,6 +192,8 @@ export default { ], list: [], + tags: [], + page: 1, pageSize: 20, total: 0, @@ -167,7 +201,7 @@ export default { } }, mounted() { - + this.loadTags() }, computed: { ...mapState(['cacheTasks']) @@ -192,6 +226,23 @@ export default { this.getLists(); }, + async loadTags() { + let tags = []; + const project_id = this.projectId + try { + const {data} = await this.$store.dispatch("call", { + url: 'project/tag/list', + data: {project_id}, + }) + tags = data || [] + } catch (e) { + tags = []; + } + if (project_id === this.projectId) { + this.tags = tags + } + }, + getLists() { if (!this.projectId) { return;