perf: 优化任务模板、任务标签

This commit is contained in:
kuaifan 2025-08-18 08:31:22 +08:00
parent 4fc4dd1b16
commit 6964158cf6
4 changed files with 15 additions and 11 deletions

View File

@ -152,7 +152,7 @@ export default {
url: 'project/tag/save', url: 'project/tag/save',
data, data,
method: 'post', method: 'post',
spinner: 300 spinner: 3000
}) })
} finally { } finally {
this.loadIng-- this.loadIng--

View File

@ -90,7 +90,7 @@ export default {
data: { data: {
project_id: this.projectId project_id: this.projectId
}, },
spinner: 300 spinner: 3000
}) })
this.tags = data || [] this.tags = data || []
} catch ({msg}) { } catch ({msg}) {
@ -118,7 +118,7 @@ export default {
data: { data: {
id: tag.id id: tag.id
}, },
spinner: 300 spinner: 3000
}) })
$A.messageSuccess(msg || '删除成功') $A.messageSuccess(msg || '删除成功')
await this.getTagData() await this.getTagData()

View File

@ -170,7 +170,7 @@ export default {
data: { data: {
project_id: this.projectId project_id: this.projectId
}, },
spinner: 300 spinner: 3000
}) })
this.templates = data || [] this.templates = data || []
} catch ({msg}) { } catch ({msg}) {
@ -230,7 +230,7 @@ export default {
url: 'project/task/template_save', url: 'project/task/template_save',
data, data,
method: 'post', method: 'post',
spinner: 300 spinner: 3000
}) })
} finally { } finally {
this.loadIng-- this.loadIng--
@ -250,10 +250,10 @@ export default {
data: { data: {
id: template.id id: template.id
}, },
spinner: 300 spinner: 3000
}) })
$A.messageSuccess(msg || '删除成功') $A.messageSuccess(msg || '删除成功')
this.loadTemplates() await this.loadTemplates()
} catch ({msg}) { } catch ({msg}) {
$A.messageError(msg || '删除失败') $A.messageError(msg || '删除失败')
} finally { } finally {
@ -273,10 +273,10 @@ export default {
id: template.id, id: template.id,
project_id: this.projectId project_id: this.projectId
}, },
spinner: 300 spinner: 3000
}) })
$A.messageSuccess(msg || '设置成功') $A.messageSuccess(msg || '设置成功')
this.loadTemplates() await this.loadTemplates()
} catch ({msg}) { } catch ({msg}) {
$A.messageError(msg || '设置失败') $A.messageError(msg || '设置失败')
} finally { } finally {

View File

@ -4,8 +4,8 @@
flex-direction: column; flex-direction: column;
.header { .header {
height: 60px; height: 64px;
padding: 10px 60px 10px 20px; padding: 0 64px 0 20px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
@ -29,6 +29,10 @@
height: 20px; height: 20px;
} }
} }
.actions {
margin-top: 1px;
}
} }
.content { .content {