diff --git a/src/api/parser.js b/src/api/parser.js new file mode 100644 index 0000000..67ab799 --- /dev/null +++ b/src/api/parser.js @@ -0,0 +1,48 @@ +import request from '@/utils/request' + +/** + * parameter: { + * pkid: '', + * } + * @param parameter + * @returns {*} + */ +// 获取邮箱数据 +export function mailAccountList(parameter) { + return request({ + url: '/api/mail/mailAccountList', + method: 'post', + data: parameter, + }) +} +// 获取解析器列表 +export function parserList(parameter) { + return request({ + url: '/api/mail/parserList', + method: 'get', + }) +} +// 获取解析器配置列表 +export function parserRelationList(parameter) { + return request({ + url: '/api/mail/parserRelationList', + method: 'get', + params: parameter, + }) +} +// 保存解析器配置(单邮箱) +export function saveParserRelation(data) { + return request({ + url: '/api/mail/saveParserRelation', + method: 'post', + data: data, + }) +} +// 发送解析邮件消息 +export function parseMail(parameter) { + return request({ + url: '/api/mail/parseMail', + method: 'get', + params: parameter, + }) +} diff --git a/src/config/router.config.js b/src/config/router.config.js index 69aa9e2..812b1c1 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -21,19 +21,19 @@ export const asyncRouterMap = [ component: () => import('@/views/dashboard/Workplace'), meta: { title: '仪表盘', keepAlive: true, icon: 'home', permission: ['dashboard'] }, }, + { + path: '/parser', + name: 'parser', + component: () => import('@/views/rulesEngine/parser'), + meta: { title: '解析器配置', keepAlive: true, icon: 'profile', permission: ['parser'] }, + }, { path: '/mail', name: 'mail', component: () => import('@/views/rulesEngine/mail'), - meta: { title: '邮件服务配置', keepAlive: true, icon: 'project', permission: ['mail'] }, + meta: { title: '邮箱解析配置', keepAlive: true, icon: 'project', permission: ['mail'] }, }, // { - // path: '/parameterAccount', - // name: 'parameterAccount', - // component: () => import('@/views/rulesEngine/parameterAccount'), - // meta: { title: '规则参数台账', keepAlive: true, icon: 'profile', permission: ['parameterAccount'] }, - // }, - // { // path: '/varAccount', // name: 'varAccount', // component: () => import('@/views/rulesEngine/varAccount'), diff --git a/src/views/rulesEngine/mail/index.vue b/src/views/rulesEngine/mail/index.vue index e5aaebd..02c9f42 100644 --- a/src/views/rulesEngine/mail/index.vue +++ b/src/views/rulesEngine/mail/index.vue @@ -15,38 +15,8 @@ /> - - - - + + 重置 查询 解析配置 - @@ -68,33 +34,7 @@
- - - - + {{ column.title }}
+ + +
diff --git a/src/views/rulesEngine/mail/modules/initData.js b/src/views/rulesEngine/mail/modules/initData.js index 775f024..a60a054 100644 --- a/src/views/rulesEngine/mail/modules/initData.js +++ b/src/views/rulesEngine/mail/modules/initData.js @@ -9,12 +9,16 @@ export default { showHeaderOverflow: true, slots: { header: 'receiveServer_header' }, }, - { field: 'useImap', title: '使用IMAP', slots: { header: 'useImap_header' } }, + { field: 'useImap', title: '使用IMAP', slots: { header: 'useImap_header', default: 'useImap_default' } }, { field: 'receivePort', title: '收件端口', slots: { header: 'receivePort_header' } }, - { field: 'receiveSSL', title: '收件使用SSL', slots: { header: 'receiveSSL_header' } }, + { + field: 'receiveSSL', + title: '收件使用SSL', + slots: { header: 'receiveSSL_header', default: 'receiveSSL_default' }, + }, { field: 'smtpServer', title: '发件服务器', slots: { header: 'smtpServer_header' } }, { field: 'smtpPort', title: '发件端口', slots: { header: 'smtpPort_header' } }, - { field: 'smtpSSL', title: '发件是使用SSL', slots: { header: 'smtpSSL_header' } }, + { field: 'smtpSSL', title: '发件是使用SSL', slots: { header: 'smtpSSL_header', default: 'smtpSSL_default' } }, // { title: '操作', width: 80, noDraggable: true, slots: { default: 'operate' }, fixed: 'right' } ], } diff --git a/src/views/rulesEngine/parser/index.vue b/src/views/rulesEngine/parser/index.vue new file mode 100644 index 0000000..fe82c22 --- /dev/null +++ b/src/views/rulesEngine/parser/index.vue @@ -0,0 +1,418 @@ + + + diff --git a/src/views/rulesEngine/parser/modules/addForm.vue b/src/views/rulesEngine/parser/modules/addForm.vue new file mode 100644 index 0000000..ec502a6 --- /dev/null +++ b/src/views/rulesEngine/parser/modules/addForm.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/views/rulesEngine/parser/modules/initData.js b/src/views/rulesEngine/parser/modules/initData.js new file mode 100644 index 0000000..a212c64 --- /dev/null +++ b/src/views/rulesEngine/parser/modules/initData.js @@ -0,0 +1,21 @@ +export default { + columns: [ + { type: 'checkbox', noDraggable: true, width: 100 }, + { + field: 'parserName', + title: '解析器名称', + slots: { header: 'parserName_header' }, + }, + { field: 'parserType', title: '解析器类', slots: { header: 'parserType_header' } }, + { field: 'processorChain', title: '处理器链', slots: { header: 'processorChain_header' } }, + { field: 'subjectRegex', title: '标题正则表达式', slots: { header: 'subjectRegex_header' } }, + { field: 'senderRegex', title: '发送人正则表达式', slots: { header: 'senderRegex_header' } }, + { + field: 'attachRegex', + title: '附件正则表达式', + showHeaderOverflow: true, + slots: { header: 'attachRegex_header' }, + }, + { title: '操作', width: 80, noDraggable: true, slots: { default: 'operate' }, fixed: 'right' }, + ], +}