diff --git a/src/api/alarm.ts b/src/api/alarm.ts index 7e51875ef..a01ca47c9 100644 --- a/src/api/alarm.ts +++ b/src/api/alarm.ts @@ -14,9 +14,9 @@ * limitations under the License. */ -import { httpGet, httpPost } from '@/api/common'; +import { crudAdd, crudDelete, crudGetById, crudList, crudUpdate } from '@/api/common'; import { API_DATA_BASE } from '@/config/constant/api'; -import type { PageQuery, PageResult } from '@/config/types'; +import type { PageQuery } from '@/config/types'; import type { MessageRecord, NotifyChannelBindRecord, @@ -37,45 +37,41 @@ const endpoints = { history: `${API_DATA_BASE}/notify/history`, } as const; -const add = (base: string, payload: T) => httpPost(`${base}/add`, payload); -const update = (base: string, payload: T) => httpPost(`${base}/update`, payload); -const remove = (base: string, id: string) => httpPost(`${base}/delete`, undefined, { params: { id } }); -const selectById = (base: string, id: string) => httpGet>(`${base}/get_by_id`, { params: { id } }); -const list = (base: string, query: PageQuery) => httpPost>>(`${base}/list`, query); +export const addRule = (payload: Partial) => crudAdd(endpoints.rule, payload); +export const updateRule = (payload: Partial) => crudUpdate(endpoints.rule, payload); +export const deleteRule = (id: string) => crudDelete(endpoints.rule, id); +export const getRuleById = (id: string) => crudGetById(endpoints.rule, id); +export const listRule = (query: PageQuery) => crudList(endpoints.rule, query); -export const addRule = (payload: Partial) => add(endpoints.rule, payload); -export const updateRule = (payload: Partial) => update(endpoints.rule, payload); -export const deleteRule = (id: string) => remove(endpoints.rule, id); -export const getRuleById = (id: string) => selectById(endpoints.rule, id); -export const listRule = (query: PageQuery) => list(endpoints.rule, query); +export const addNotify = (payload: Partial) => crudAdd(endpoints.notify, payload); +export const updateNotify = (payload: Partial) => crudUpdate(endpoints.notify, payload); +export const deleteNotify = (id: string) => crudDelete(endpoints.notify, id); +export const getNotifyById = (id: string) => crudGetById(endpoints.notify, id); +export const listNotify = (query: PageQuery) => crudList(endpoints.notify, query); -export const addNotify = (payload: Partial) => add(endpoints.notify, payload); -export const updateNotify = (payload: Partial) => update(endpoints.notify, payload); -export const deleteNotify = (id: string) => remove(endpoints.notify, id); -export const getNotifyById = (id: string) => selectById(endpoints.notify, id); -export const listNotify = (query: PageQuery) => list(endpoints.notify, query); +export const addMessage = (payload: Partial) => crudAdd(endpoints.message, payload); +export const updateMessage = (payload: Partial) => crudUpdate(endpoints.message, payload); +export const deleteMessage = (id: string) => crudDelete(endpoints.message, id); +export const getMessageById = (id: string) => crudGetById(endpoints.message, id); +export const listMessage = (query: PageQuery) => crudList(endpoints.message, query); -export const addMessage = (payload: Partial) => add(endpoints.message, payload); -export const updateMessage = (payload: Partial) => update(endpoints.message, payload); -export const deleteMessage = (id: string) => remove(endpoints.message, id); -export const getMessageById = (id: string) => selectById(endpoints.message, id); -export const listMessage = (query: PageQuery) => list(endpoints.message, query); +export const addNotifyChannel = (payload: Partial) => crudAdd(endpoints.channel, payload); +export const updateNotifyChannel = (payload: Partial) => crudUpdate(endpoints.channel, payload); +export const deleteNotifyChannel = (id: string) => crudDelete(endpoints.channel, id); +export const getNotifyChannelById = (id: string) => crudGetById(endpoints.channel, id); +export const listNotifyChannel = (query: PageQuery) => crudList(endpoints.channel, query); -export const addNotifyChannel = (payload: Partial) => add(endpoints.channel, payload); -export const updateNotifyChannel = (payload: Partial) => update(endpoints.channel, payload); -export const deleteNotifyChannel = (id: string) => remove(endpoints.channel, id); -export const getNotifyChannelById = (id: string) => selectById(endpoints.channel, id); -export const listNotifyChannel = (query: PageQuery) => list(endpoints.channel, query); - -export const addNotifyChannelBind = (payload: Partial) => add(endpoints.channelBind, payload); +export const addNotifyChannelBind = (payload: Partial) => + crudAdd(endpoints.channelBind, payload); export const updateNotifyChannelBind = (payload: Partial) => - update(endpoints.channelBind, payload); -export const deleteNotifyChannelBind = (id: string) => remove(endpoints.channelBind, id); -export const getNotifyChannelBindById = (id: string) => selectById(endpoints.channelBind, id); -export const listNotifyChannelBind = (query: PageQuery) => list(endpoints.channelBind, query); + crudUpdate(endpoints.channelBind, payload); +export const deleteNotifyChannelBind = (id: string) => crudDelete(endpoints.channelBind, id); +export const getNotifyChannelBindById = (id: string) => crudGetById(endpoints.channelBind, id); +export const listNotifyChannelBind = (query: PageQuery) => + crudList(endpoints.channelBind, query); -export const getRuleStateById = (id: string) => selectById(endpoints.state, id); -export const listRuleState = (query: PageQuery) => list(endpoints.state, query); +export const getRuleStateById = (id: string) => crudGetById(endpoints.state, id); +export const listRuleState = (query: PageQuery) => crudList(endpoints.state, query); -export const getNotifyHistoryById = (id: string) => selectById(endpoints.history, id); -export const listNotifyHistory = (query: PageQuery) => list(endpoints.history, query); +export const getNotifyHistoryById = (id: string) => crudGetById(endpoints.history, id); +export const listNotifyHistory = (query: PageQuery) => crudList(endpoints.history, query); diff --git a/src/api/command.ts b/src/api/command.ts index 0aa9a84d6..2b530c518 100644 --- a/src/api/command.ts +++ b/src/api/command.ts @@ -14,33 +14,38 @@ * limitations under the License. */ -import { httpGet, httpPost } from '@/api/common'; +import { crudAdd, crudDelete, crudGetById, crudList, crudUpdate, httpGet, httpPost } from '@/api/common'; import { API_DATA_BASE, API_MANAGER_BASE } from '@/config/constant/api'; import type { PageQuery, PageResult } from '@/config/types'; -import type { CommandHistory, CommandRecord } from '@/config/types/command'; +import type { CommandHistory, CommandParamRecord, CommandRecord } from '@/config/types/command'; const endpoints = { command: `${API_MANAGER_BASE}/command`, + commandParam: `${API_MANAGER_BASE}/command_param`, commandHistory: `${API_DATA_BASE}/command_history`, } as const; -const add = (base: string, payload: T) => httpPost(`${base}/add`, payload); -const update = (base: string, payload: T) => httpPost(`${base}/update`, payload); -const remove = (base: string, id: string) => httpPost(`${base}/delete`, undefined, { params: { id } }); -const selectById = (base: string, id: string) => httpGet>(`${base}/get_by_id`, { params: { id } }); -const list = (base: string, query: PageQuery) => httpPost>>(`${base}/list`, query); +// Command Definition CRUD -// ─── Command Definition CRUD ───────────────────────────────────────── - -export const addCommand = (payload: Partial) => add(endpoints.command, payload); -export const updateCommand = (payload: Partial) => update(endpoints.command, payload); -export const deleteCommand = (id: string) => remove(endpoints.command, id); -export const getCommandById = (id: string) => selectById(endpoints.command, id); -export const listCommand = (query: PageQuery) => list(endpoints.command, query); +export const addCommand = (payload: Partial) => crudAdd(endpoints.command, payload); +export const updateCommand = (payload: Partial) => crudUpdate(endpoints.command, payload); +export const deleteCommand = (id: string) => crudDelete(endpoints.command, id); +export const getCommandById = (id: string) => crudGetById(endpoints.command, id); +export const listCommand = (query: PageQuery) => crudList(endpoints.command, query); export const listCommandByProfileId = (profileId: string) => httpGet>(`${endpoints.command}/list_by_profile_id`, { params: { profile_id: profileId } }); -// ─── Command History Queries ────────────────────────────────────────── +// Command Param CRUD + +export const addCommandParam = (payload: Partial) => crudAdd(endpoints.commandParam, payload); +export const updateCommandParam = (payload: Partial) => crudUpdate(endpoints.commandParam, payload); +export const deleteCommandParam = (id: string) => crudDelete(endpoints.commandParam, id); +export const listCommandParamByCommandId = (commandId: string) => + httpGet>(`${endpoints.commandParam}/list_by_command_id`, { + params: { command_id: commandId }, + }); + +// Command History Queries export const getCommandHistoryById = (recordId: string) => httpGet>(`${endpoints.commandHistory}/${recordId}`); diff --git a/src/api/common.ts b/src/api/common.ts index c3267ab13..3addb6caa 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -16,6 +16,7 @@ import request from '@/config/axios'; import type { AxiosRequestConfig } from 'axios'; +import type { PageQuery, PageResult } from '@/config/types'; /** * Shared HTTP helpers so every `src/api/*.ts` module stays a one-liner per @@ -28,3 +29,18 @@ export const httpGet = (url: string, config?: AxiosRequestConfig) => export const httpPost = (url: string, data?: D, config?: AxiosRequestConfig) => request({ ...config, url, method: 'post', data }); + +export const crudAdd = (base: string, payload: TPayload) => + httpPost, TPayload>(`${base}/add`, payload); + +export const crudUpdate = (base: string, payload: TPayload) => + httpPost, TPayload>(`${base}/update`, payload); + +export const crudDelete = (base: string, id: string) => + httpPost>(`${base}/delete`, undefined, { params: { id } }); + +export const crudGetById = (base: string, id: string) => + httpGet>(`${base}/get_by_id`, { params: { id } }); + +export const crudList = (base: string, query: PageQuery) => + httpPost>, PageQuery>(`${base}/list`, query); diff --git a/src/api/event.ts b/src/api/event.ts index 738c8cdea..28119d28c 100644 --- a/src/api/event.ts +++ b/src/api/event.ts @@ -14,33 +14,36 @@ * limitations under the License. */ -import { httpGet, httpPost } from '@/api/common'; +import { crudAdd, crudDelete, crudGetById, crudList, crudUpdate, httpGet, httpPost } from '@/api/common'; import { API_DATA_BASE, API_MANAGER_BASE } from '@/config/constant/api'; import type { PageQuery, PageResult } from '@/config/types'; -import type { EventHistory, EventRecord } from '@/config/types/event'; +import type { EventHistory, EventParamRecord, EventRecord } from '@/config/types/event'; const endpoints = { event: `${API_MANAGER_BASE}/event`, + eventParam: `${API_MANAGER_BASE}/event_param`, eventHistory: `${API_DATA_BASE}/event_history`, } as const; -const add = (base: string, payload: T) => httpPost(`${base}/add`, payload); -const update = (base: string, payload: T) => httpPost(`${base}/update`, payload); -const remove = (base: string, id: string) => httpPost(`${base}/delete`, undefined, { params: { id } }); -const selectById = (base: string, id: string) => httpGet>(`${base}/get_by_id`, { params: { id } }); -const list = (base: string, query: PageQuery) => httpPost>>(`${base}/list`, query); +// Event Definition CRUD -// ─── Event Definition CRUD ──────────────────────────────────────────── - -export const addEvent = (payload: Partial) => add(endpoints.event, payload); -export const updateEvent = (payload: Partial) => update(endpoints.event, payload); -export const deleteEvent = (id: string) => remove(endpoints.event, id); -export const getEventById = (id: string) => selectById(endpoints.event, id); -export const listEvent = (query: PageQuery) => list(endpoints.event, query); +export const addEvent = (payload: Partial) => crudAdd(endpoints.event, payload); +export const updateEvent = (payload: Partial) => crudUpdate(endpoints.event, payload); +export const deleteEvent = (id: string) => crudDelete(endpoints.event, id); +export const getEventById = (id: string) => crudGetById(endpoints.event, id); +export const listEvent = (query: PageQuery) => crudList(endpoints.event, query); export const listEventByProfileId = (profileId: string) => httpGet>(`${endpoints.event}/list_by_profile_id`, { params: { profile_id: profileId } }); -// ─── Event History Queries ──────────────────────────────────────────── +// Event Param CRUD + +export const addEventParam = (payload: Partial) => crudAdd(endpoints.eventParam, payload); +export const updateEventParam = (payload: Partial) => crudUpdate(endpoints.eventParam, payload); +export const deleteEventParam = (id: string) => crudDelete(endpoints.eventParam, id); +export const listEventParamByEventId = (eventId: string) => + httpGet>(`${endpoints.eventParam}/list_by_event_id`, { params: { event_id: eventId } }); + +// Event History Queries export const getEventHistoryById = (recordId: string) => httpGet>(`${endpoints.eventHistory}/${recordId}`); diff --git a/src/api/resource.ts b/src/api/resource.ts index 12bd905f4..f990156c4 100644 --- a/src/api/resource.ts +++ b/src/api/resource.ts @@ -19,16 +19,20 @@ import { API_AUTH_BASE } from '@/config/constant/api'; import type { PageQuery, PageResult } from '@/config/types'; import type { ResourceForm, ResourceRecord } from '@/config/types/auth'; -export const addResource = (resource: ResourceForm) => httpPost(`${API_AUTH_BASE}/resource/add`, resource); +export const addResource = (resource: ResourceForm) => + httpPost>(`${API_AUTH_BASE}/resource/add`, resource); export const deleteResource = (id: string) => httpPost(`${API_AUTH_BASE}/resource/delete`, undefined, { params: { id } }); -export const updateResource = (resource: ResourceForm) => httpPost(`${API_AUTH_BASE}/resource/update`, resource); +export const updateResource = (resource: ResourceForm) => + httpPost>(`${API_AUTH_BASE}/resource/update`, resource); -export const getResourceById = (id: string) => httpGet(`${API_AUTH_BASE}/resource/get_by_id`, { params: { id } }); +export const getResourceById = (id: string) => + httpGet>(`${API_AUTH_BASE}/resource/get_by_id`, { params: { id } }); export const listResource = >>(query: PageQuery) => httpPost(`${API_AUTH_BASE}/resource/list`, query); -export const listResourceTree = (query: PageQuery = {}) => httpPost(`${API_AUTH_BASE}/resource/list_tree`, query); +export const listResourceTree = (query: PageQuery = {}) => + httpPost>(`${API_AUTH_BASE}/resource/list_tree`, query); diff --git a/src/components/agentic/AgenticAssistant.vue b/src/components/agentic/AgenticAssistant.vue index 1ccbed541..d55bf65aa 100644 --- a/src/components/agentic/AgenticAssistant.vue +++ b/src/components/agentic/AgenticAssistant.vue @@ -745,7 +745,7 @@ try { await agenticStore.uploadAttachment(file); } catch (error) { - ElMessage.error(error instanceof Error ? error.message : 'Upload failed'); + ElMessage.error(error instanceof Error ? error.message : t('agentic.uploadFailed')); } } }; @@ -757,12 +757,12 @@ cancelButtonText: t('agentic.dialogCancel'), }); await agenticStore.confirmAction(actionId); - ElMessage.success('Action confirmed'); + ElMessage.success(t('agentic.actionConfirmed')); }; const handleRejectAction = async (actionId: string) => { await agenticStore.rejectAction(actionId); - ElMessage.success('Action rejected'); + ElMessage.success(t('agentic.actionRejected')); }; const handleCopyMessage = async (message: AgenticMessage) => { diff --git a/src/components/card/actions/ThingsCardActions.vue b/src/components/card/actions/ThingsCardActions.vue index e0d181cf5..4ff340304 100644 --- a/src/components/card/actions/ThingsCardActions.vue +++ b/src/components/card/actions/ThingsCardActions.vue @@ -87,7 +87,7 @@ margin-top: 2px; display: flex; justify-content: flex-end; - border-top: 1px solid #dcdfe6; + border-top: 1px solid var(--el-border-color); } .things-card-footer-operation { diff --git a/src/components/card/dashboard/DashboardCard.vue b/src/components/card/dashboard/DashboardCard.vue index f0f9d0a1c..f1ab3c6d5 100644 --- a/src/components/card/dashboard/DashboardCard.vue +++ b/src/components/card/dashboard/DashboardCard.vue @@ -247,13 +247,13 @@ .dashboard-card__title-text { font-weight: 600; - color: #303133; + color: var(--el-text-color-primary); } .dashboard-card__subtitle { font-size: 12px; font-weight: normal; - color: #909399; + color: var(--el-text-color-secondary); } // Badge sits inline with the title — override the default floating @@ -332,7 +332,7 @@ // ---- footer ---------------------------------------------------------- // Opt-in bar beneath the body. Matches LiveFeed's "updated at + rows" - // look: 8/16 padding, 12px/#909399 text, light top border, #fafafa bg. + // look: 8/16 padding, secondary text, light top border and subtle bg. // Consumers lay out content with a pair of s — flex space-between // handles the rest. .dashboard-card__footer { @@ -342,9 +342,9 @@ gap: 8px; padding: 8px 16px; font-size: 12px; - color: #909399; + color: var(--el-text-color-secondary); border-top: 1px solid var(--el-border-color-lighter); - background: #fafafa; + background: var(--el-fill-color-lighter); flex-shrink: 0; } diff --git a/src/components/card/header/ThingsCardHeader.vue b/src/components/card/header/ThingsCardHeader.vue index cba09ee9c..91bb7e256 100644 --- a/src/components/card/header/ThingsCardHeader.vue +++ b/src/components/card/header/ThingsCardHeader.vue @@ -63,7 +63,7 @@ line-height: 48px; font-size: 14px; font-weight: bold; - color: rgba(0, 0, 0, 0.85); + color: var(--el-text-color-primary); cursor: pointer; display: block; overflow: hidden; @@ -72,7 +72,7 @@ width: 200px; &:hover { - color: #1890ff; + color: var(--el-color-primary); } } @@ -89,10 +89,10 @@ } .header-enable { - border-bottom: 1px solid #c2e7b0; + border-bottom: 1px solid var(--el-color-success-light-5); } .header-disable { - border-bottom: 1px solid #fbc4c4; + border-bottom: 1px solid var(--el-color-danger-light-5); } diff --git a/src/components/card/skeleton/SkeletonCard.vue b/src/components/card/skeleton/SkeletonCard.vue index 337bed8e9..020aaa147 100644 --- a/src/components/card/skeleton/SkeletonCard.vue +++ b/src/components/card/skeleton/SkeletonCard.vue @@ -95,7 +95,7 @@ width: 100%; height: 55px; display: flex; - border-bottom: 1px solid #dcdfe6; + border-bottom: 1px solid var(--el-border-color); } .skeleton-card-icon { @@ -152,7 +152,7 @@ display: flex; justify-content: flex-end; align-items: center; - border-top: 1px solid #dcdfe6; + border-top: 1px solid var(--el-border-color); } .skeleton-card-operation { diff --git a/src/components/card/stat/StatCard.vue b/src/components/card/stat/StatCard.vue index 926a03df3..95e875d65 100644 --- a/src/components/card/stat/StatCard.vue +++ b/src/components/card/stat/StatCard.vue @@ -118,19 +118,19 @@ // --stat-card-accent values declared in the scoped styles below so a // palette change only needs updating in one place conceptually. const TONE_ACCENT: Record = { - blue: '#409eff', - green: '#67c23a', - orange: '#e6a23c', + blue: 'var(--el-color-primary)', + green: 'var(--el-color-success)', + orange: 'var(--el-color-warning)', purple: '#9059f6', - red: '#f56c6c', + red: 'var(--el-color-danger)', }; const accentColor = computed(() => TONE_ACCENT[props.tone] || TONE_ACCENT.blue); diff --git a/src/views/device/add/DeviceAddForm.vue b/src/views/device/add/DeviceAddForm.vue index 574af307c..5a745ac63 100644 --- a/src/views/device/add/DeviceAddForm.vue +++ b/src/views/device/add/DeviceAddForm.vue @@ -87,7 +87,7 @@ @@ -238,7 +238,3 @@ addThing, }); - - diff --git a/src/views/device/card/DeviceCard.vue b/src/views/device/card/DeviceCard.vue index f12f87f44..148573265 100644 --- a/src/views/device/card/DeviceCard.vue +++ b/src/views/device/card/DeviceCard.vue @@ -19,7 +19,7 @@
- - diff --git a/src/views/device/detail/DeviceDetail.vue b/src/views/device/detail/DeviceDetail.vue index d17195ad2..b9c0036ae 100644 --- a/src/views/device/detail/DeviceDetail.vue +++ b/src/views/device/detail/DeviceDetail.vue @@ -202,7 +202,3 @@ device(); }); - - diff --git a/src/views/device/edit/DeviceEdit.vue b/src/views/device/edit/DeviceEdit.vue index 5df9bc6b9..863e42376 100644 --- a/src/views/device/edit/DeviceEdit.vue +++ b/src/views/device/edit/DeviceEdit.vue @@ -96,9 +96,9 @@ /> - {{ $t('common.return') }} + {{ $t('common.return') }} {{ $t('common.reset') }} - {{ $t('common.next') }} + {{ $t('common.next') }} @@ -155,11 +155,11 @@ - {{ $t('common.previous') }} + {{ $t('common.previous') }} {{ $t('common.reset') }} - {{ $t('common.next') }} + {{ $t('common.next') }} @@ -297,8 +297,8 @@ - {{ $t('common.previous') }} - + {{ $t('common.previous') }} + {{ $t('common.next') }} @@ -436,8 +436,8 @@ - {{ $t('common.previous') }} - + {{ $t('common.previous') }} + {{ $t('common.next') }} @@ -575,8 +575,8 @@ - {{ $t('common.previous') }} - + {{ $t('common.previous') }} + {{ $t('common.next') }} diff --git a/src/views/device/import/DeviceImportForm.vue b/src/views/device/import/DeviceImportForm.vue index 574269f22..d83f9f6ca 100644 --- a/src/views/device/import/DeviceImportForm.vue +++ b/src/views/device/import/DeviceImportForm.vue @@ -95,7 +95,7 @@
@@ -123,7 +117,7 @@ diff --git a/src/views/point/value/detail/PointValueDetail.vue b/src/views/point/value/detail/PointValueDetail.vue index 7361e8f77..250857b36 100644 --- a/src/views/point/value/detail/PointValueDetail.vue +++ b/src/views/point/value/detail/PointValueDetail.vue @@ -23,10 +23,27 @@ direction="rtl" size="40%" > -
-      {{ detailData }}
-    
+
{{ formatJson(detailData) }}
- diff --git a/src/views/point/value/edit/PointValueEditForm.vue b/src/views/point/value/edit/PointValueEditForm.vue index f01fd9c8f..c25e4d167 100644 --- a/src/views/point/value/edit/PointValueEditForm.vue +++ b/src/views/point/value/edit/PointValueEditForm.vue @@ -47,7 +47,7 @@ @@ -100,12 +100,12 @@ ], }); - const syncFormData = () => { - reactiveData.formData = { ...props.formData }; + const syncFormData = (value = props.formData) => { + reactiveData.formData = { ...value }; }; - const show = () => { - syncFormData(); + const show = (value?: PointValueFormData) => { + syncFormData(value); reactiveData.formVisible = true; }; @@ -143,7 +143,3 @@ updateThing, }); - - diff --git a/src/views/profile/Profile.vue b/src/views/profile/Profile.vue index 82fee4141..4e92afd7d 100644 --- a/src/views/profile/Profile.vue +++ b/src/views/profile/Profile.vue @@ -224,5 +224,3 @@ list(); - - diff --git a/src/views/profile/add/ProfileAddForm.vue b/src/views/profile/add/ProfileAddForm.vue index 342963c65..971b75281 100644 --- a/src/views/profile/add/ProfileAddForm.vue +++ b/src/views/profile/add/ProfileAddForm.vue @@ -47,7 +47,7 @@ @@ -122,7 +122,3 @@ addThing, }); - - diff --git a/src/views/profile/card/ProfileCard.vue b/src/views/profile/card/ProfileCard.vue index 09108cb6f..17368a2fe 100644 --- a/src/views/profile/card/ProfileCard.vue +++ b/src/views/profile/card/ProfileCard.vue @@ -19,7 +19,7 @@
- - diff --git a/src/views/profile/detail/ProfileDetail.vue b/src/views/profile/detail/ProfileDetail.vue index d34de0f19..3d5fc8ad0 100644 --- a/src/views/profile/detail/ProfileDetail.vue +++ b/src/views/profile/detail/ProfileDetail.vue @@ -63,7 +63,3 @@ diff --git a/src/views/settings/agentic/detail/ModelConfigDetail.vue b/src/views/settings/agentic/detail/ModelConfigDetail.vue index cea94e706..0f9f6c34e 100644 --- a/src/views/settings/agentic/detail/ModelConfigDetail.vue +++ b/src/views/settings/agentic/detail/ModelConfigDetail.vue @@ -65,10 +65,10 @@ {{ reactiveData.data.remark || '-' }} - {{ reactiveData.data.createTime ? timestamp(reactiveData.data.createTime) : '-' }} + {{ timestampLabel(reactiveData.data.createTime) }} - {{ reactiveData.data.operateTime ? timestamp(reactiveData.data.operateTime) : '-' }} + {{ timestampLabel(reactiveData.data.operateTime) }} @@ -88,7 +88,7 @@ import DefaultTag from '@/components/tag/DefaultTag.vue'; import EnableTag from '@/components/tag/EnableTag.vue'; import type { AgenticModelConfig } from '@/config/types'; - import { timestamp } from '@/utils/dateUtil'; + import { timestampLabel } from '@/utils/dateUtil'; const route = useRoute(); @@ -116,8 +116,6 @@ diff --git a/src/views/settings/agentic/edit/ModelConfigEditForm.vue b/src/views/settings/agentic/edit/ModelConfigEditForm.vue index bafb23e44..7517c2a51 100644 --- a/src/views/settings/agentic/edit/ModelConfigEditForm.vue +++ b/src/views/settings/agentic/edit/ModelConfigEditForm.vue @@ -74,7 +74,7 @@