up
This commit is contained in:
@@ -581,6 +581,28 @@ func ApiSysAdmin(r *gin.RouterGroup) {
|
||||
}
|
||||
}
|
||||
|
||||
if params.Module == "all" || params.Module == "calendar" {
|
||||
var logs []TabCalendarLog
|
||||
query := models.DB.Model(&TabCalendarLog{})
|
||||
if params.Module == "calendar" {
|
||||
query.Order("created_at DESC").Find(&logs)
|
||||
} else {
|
||||
query.Order("created_at DESC").Limit(1000).Find(&logs)
|
||||
}
|
||||
for _, log := range logs {
|
||||
allLogs = append(allLogs, LogEntry{
|
||||
ID: log.ID,
|
||||
Module: "calendar",
|
||||
EntityID: log.CalendarID,
|
||||
UserID: log.UserID,
|
||||
ActionType: log.ActionType,
|
||||
IP: log.IP,
|
||||
Remark: log.Remark,
|
||||
CreatedAt: log.CreatedAt,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if params.Module == "all" || params.Module == "warehouse" {
|
||||
var logs []TabWarehouseLog
|
||||
query := models.DB.Model(&TabWarehouseLog{})
|
||||
|
||||
@@ -553,6 +553,7 @@
|
||||
"module_purchase": "采购",
|
||||
"module_schedule": "日程",
|
||||
"module_warehouse": "仓库",
|
||||
"module_calendar": "日历",
|
||||
"module_work_order": "工单",
|
||||
"action_create": "创建",
|
||||
"action_update": "更新",
|
||||
|
||||
@@ -47,7 +47,7 @@ const eventData = ref({
|
||||
const colorOptions = ref([
|
||||
{ value: "#3788d9", label: t("schedule.work"), name: t("schedule.work"), type: "work" },
|
||||
{ value: "#06d6a0", label: t("schedule.duty"), name: t("schedule.duty"), type: "duty" },
|
||||
{ value: "#ff595e", label: t("schedule.exam"), name: t("schedule.exam"), type: "exam" },
|
||||
{ value: "#976BC2", label: t("schedule.exam"), name: t("schedule.exam"), type: "exam" },
|
||||
{ value: "#ffca3a", label: t("schedule.standby"), name: t("schedule.standby"), type: "standby" },
|
||||
{ value: "#D16C13", label: t("schedule.personal_holiday"), name: t("schedule.personal_holiday"), type: "personal_holiday" },
|
||||
{ value: "#D10D21", label: t("schedule.public_holiday"), name: t("schedule.public_holiday"), type: "public_holiday" },
|
||||
|
||||
@@ -24,6 +24,7 @@ const modules = [
|
||||
{ id: 'schedule', label: 'schedule.title' },
|
||||
{ id: 'warehouse', label: 'warehouse.title' },
|
||||
{ id: 'work_order', label: 'work_order.title' },
|
||||
{ id: 'calendar', label: 'calendar.calendars' },
|
||||
]
|
||||
const activeModule = ref('all')
|
||||
|
||||
@@ -83,6 +84,7 @@ function getModuleClass(module) {
|
||||
purchase: 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400',
|
||||
schedule: 'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400',
|
||||
warehouse: 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-400',
|
||||
calendar: 'bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400',
|
||||
work_order: 'bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-400',
|
||||
}
|
||||
return map[module] || 'bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-400'
|
||||
|
||||
Reference in New Issue
Block a user