Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/daas/src/i18n/langs/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,8 @@ export default {
notify_migration: 'Data copy',
notify_notice_type: 'Message Type',
notify_notice_level: 'Message level',
notify_belong_module: 'Module',
notify_search_server_name: 'Search task name or other keywords',
notify_manage_sever: 'Management side',
notify_inspect: 'Verify Task',
notify_ddl_deal: 'DDL processing',
Expand Down
2 changes: 2 additions & 0 deletions apps/daas/src/i18n/langs/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,8 @@ export default {
notify_migration: '数据复制',
notify_notice_type: '消息类型',
notify_notice_level: '消息级别',
notify_belong_module: '所属模块',
notify_search_server_name: '搜索任务名称或其他关键字',
notify_manage_sever: '管理端',
notify_inspect: '校验任务',
notify_ddl_deal: 'DDL处理',
Expand Down
2 changes: 2 additions & 0 deletions apps/daas/src/i18n/langs/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,8 @@ export default {
notify_migration: '數據複製',
notify_notice_type: '消息類型',
notify_notice_level: '消息級別',
notify_belong_module: '所屬模組',
notify_search_server_name: '搜尋任務名稱或其他關鍵字',
notify_manage_sever: '管理端',
notify_inspect: '校驗任務',
notify_ddl_deal: 'DDL處理',
Expand Down
43 changes: 41 additions & 2 deletions apps/daas/src/views/notification/SystemNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import {
readAllNotifications,
} from '@tap/api/src/core/notification'
import PageContainer from '@tap/business/src/components/PageContainer.vue'
import VIcon from '@tap/component/src/base/VIcon.vue'
import SelectList from '@tap/component/src/filter-bar/FilterItemSelect.vue'
import { $emit, $on } from '@tap/shared/src/event'
import dayjs from 'dayjs'
import { debounce } from 'lodash-es'
import { TYPEMAP } from './tyepMap'

export default {
components: { SelectList, PageContainer },
components: { SelectList, PageContainer, VIcon },
emits: ['notificationUpdate'],
data() {
return {
Expand All @@ -25,6 +27,8 @@ export default {
searchParams: {
search: '',
msg: '',
system: '',
serverName: '',
},

currentPage: 1,
Expand All @@ -44,6 +48,14 @@ export default {
JobDDL: this.$t('notify_ddl_deal'),
system: this.$t('notify_system'),
},
systemOptions: [
{ value: 'sync', label: this.$t('notify_sync') },
{ value: 'migration', label: this.$t('notify_migration') },
{ value: 'agent', label: this.$t('notify_manage_sever') },
{ value: 'inspect', label: this.$t('notify_inspect') },
{ value: 'JobDDL', label: this.$t('notify_ddl_deal') },
{ value: 'system', label: this.$t('notify_system') },
],
options: [
{
value: 'ERROR',
Expand Down Expand Up @@ -113,6 +125,7 @@ export default {
}
},
created() {
this.getDataDebounce = debounce(this.getData, 300)
this.getData()
this.getFilterItems()
$on(this.$root, 'notificationUpdate', () => {
Expand All @@ -124,7 +137,7 @@ export default {
this.$router.push({ name: 'notificationSetting' })
},
getData() {
const { search, msg } = this.searchParams
const { search, msg, system, serverName } = this.searchParams
const where = {}
if (!this.read) {
where.read = false
Expand All @@ -135,6 +148,12 @@ export default {
if (msg || msg !== '') {
where.msg = msg
}
if (system || system !== '') {
where.system = system
}
if (serverName || serverName !== '') {
where.serverName = { like: serverName, options: 'i' }
}
const filter = {
where,
order: 'createTime DESC',
Expand Down Expand Up @@ -369,6 +388,26 @@ export default {
dropdown-width="240px"
@change="getData()"
/>
<SelectList
v-model="searchParams.system"
:items="systemOptions"
:label="$t('notify_belong_module')"
clearable
dropdown-width="240px"
@change="getData()"
/>
<ElInput
v-model="searchParams.serverName"
:placeholder="$t('notify_search_server_name')"
clearable
style="width: 300px"
@keyup="getDataDebounce()"
@clear="getData()"
>
<template #prefix>
<VIcon>magnify</VIcon>
</template>
</ElInput>
</div>
<ul
v-if="listData && listData.length"
Expand Down
Loading