feat: Implement scheduled tasks management and budget archiving functionality
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 6s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 2s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 6s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 2s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
- Added BudgetArchiveJob for monthly budget archiving. - Created BudgetArchive entity and BudgetArchiveRepository for managing archived budgets. - Introduced JobController for handling job execution, pausing, and resuming. - Developed ScheduledTasksView for displaying and managing scheduled tasks in the frontend. - Updated PeriodicBillJob to improve scope handling. - Enhanced OpenAiService with increased HTTP timeout. - Added archiveBudgets API endpoint for archiving budgets by year and month. - Refactored BudgetController to utilize new repository patterns and improved error handling. - Introduced rich-content styles for better rendering of HTML content in Vue components. - Updated various Vue components to support rich HTML content display.
This commit is contained in:
@@ -72,3 +72,15 @@ export function toggleStopBudget(id) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 归档预算
|
||||
* @param {number} year 年份
|
||||
* @param {number} month 月份
|
||||
*/
|
||||
export function archiveBudgets(year, month) {
|
||||
return request({
|
||||
url: `/Budget/ArchiveBudgetsAsync/${year}/${month}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
32
Web/src/api/job.js
Normal file
32
Web/src/api/job.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import request from '@/api/request'
|
||||
|
||||
export function getJobs() {
|
||||
return request({
|
||||
url: '/Job/GetJobs',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function executeJob(jobName) {
|
||||
return request({
|
||||
url: '/Job/Execute',
|
||||
method: 'post',
|
||||
data: { jobName }
|
||||
})
|
||||
}
|
||||
|
||||
export function pauseJob(jobName) {
|
||||
return request({
|
||||
url: '/Job/Pause',
|
||||
method: 'post',
|
||||
data: { jobName }
|
||||
})
|
||||
}
|
||||
|
||||
export function resumeJob(jobName) {
|
||||
return request({
|
||||
url: '/Job/Resume',
|
||||
method: 'post',
|
||||
data: { jobName }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user