diff --git a/src/permission.js b/src/permission.js index f780f19..4d29677 100644 --- a/src/permission.js +++ b/src/permission.js @@ -21,7 +21,8 @@ const whiteList = [ '/register', '/systemInit', '/databaseLogin', - '/apiLogs' + '/apiLogs', + '/apiLogsError' ] diff --git a/src/router/index.js b/src/router/index.js index 28c72b3..e3839da 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -45,6 +45,11 @@ export const constantRoutes = [{ component: () => import('@/views/apiLogs/index.vue'), hidden: true }, + { + path: '/apiLogsError', + component: () => import('@/views/apiLogsError/index.vue'), + hidden: true + }, { path: '/login', component: () => import('@/views/login'), diff --git a/src/views/apiLogs/index.vue b/src/views/apiLogs/index.vue index c6a7f8c..03c6ac6 100644 --- a/src/views/apiLogs/index.vue +++ b/src/views/apiLogs/index.vue @@ -278,18 +278,19 @@ export default { handleSearchEvent(form) { let data = this.$refs.baseLayout.ruleForm; this.queryModel = {...data} - if (!data.sendApp) { - this.$vmNews("请选择发送者应用") - return - } - if (!data.receiveApp) { - this.$vmNews("请选择接受者应用") - return - } - if (!data.receiveApi) { - this.$vmNews("请选择接受者api") - return - } + console.log(data.receiveApp) + // if (!data.sendApp) { + // this.$vmNews("请选择发送者应用") + // return + // } + // if (!data.receiveApp) { + // this.$vmNews("请选择接受者应用") + // return + // } + // if (!data.receiveApi) { + // this.$vmNews("请选择接受者api") + // return + // } if (!data.status) { this.$vmNews("请选择状态") return diff --git a/src/views/apiLogsError/configData.js b/src/views/apiLogsError/configData.js new file mode 100644 index 0000000..c257bbe --- /dev/null +++ b/src/views/apiLogsError/configData.js @@ -0,0 +1,345 @@ +/** + * @desc 消息管理日志 + * @date 2023-08-31 + */ +// 表头 +const tableColumnData = [ + { + label: '发送者应用', + prop: 'sendAppName', + tooltip: true, + }, + { + label: '源数据', + prop: 'sourceData', + tooltip: true, + }, + { + label: '目标数据', + prop: 'targetData', + tooltip: true, + }, + { + label: '状态', + prop: 'status', + tooltip: true, + }, + { + label: '错误状态', + prop: 'errorStatus', + tooltip: true, + }, + { + label: '返回信息', + prop: 'returnData', + tooltip: true, + }, { + label: '创建时间', + prop: 'createTime', + tooltip: true, + }, + { + label: '备注', + prop: 'remark', + tooltip: true, + }, +] +const tableVersionColumn = [ + { + label: '接收者名称', + prop: 'receiveName', + }, + { + label: '接收者编码', + prop: 'receiveCode', + }, + { + label: '接收者应用', + prop: 'receiveApp', + }, + { + label: '接收者', + prop: 'receiveApi', + }, + { + label: '数据类型', + prop: 'dataType', + }, + { + label: '备注', + prop: 'remark', + }, +] + +// 基本信息内容 +const formRow = [ + { + elCol: [{ + label: '消息管理名称', + prop: 'theme', + tag: 'elInput', + disabled: true, + span: 24 + }] + }, + { + elCol: [{ + label: '发送者应用', + prop: 'sendApp', + tag: 'elSelect', + disabled: true, + options: [], + optionValue: 'id', + optionLabel: 'name', + }, { + label: '发送者', + prop: 'sendApi', + tag: 'elSelect', + disabled: true, + options: [], + optionValue: 'id', + optionLabel: 'apiName', + }] + }, + { + elCol: [{ + label: '接收者应用', + prop: 'receiveApp', + tag: 'elSelect', + disabled: true, + options: [], + optionValue: 'id', + optionLabel: 'name', + }, { + label: '接收者', + prop: 'receiveApi', + tag: 'elSelect', + disabled: true, + options: [], + optionValue: 'id', + optionLabel: 'apiName', + }] + }, + { + elCol: [{ + label: '源数据', + prop: 'sourceData', + tag: 'elSlot', + slotName: "sourceData", + span: 24, + }] + }, + { + elCol: [{ + label: '目标数据', + prop: 'targetData', + tag: 'elSlot', + slotName: "targetData", + span: 24, + }] + }, + { + elCol: [{ + label: '状态', + prop: 'status', + tag: 'elRadio', + disabled: true, + span: 24, + options: [ + {value: "1", label: "待发送"}, + {value: "2", label: "发送中"}, + {value: "3", label: "发送成功"}, + {value: "4", label: "发送失败"}, + ], + },] + }, + { + elCol: [{ + label: '错误状态', + prop: 'error_status', + tag: 'elRadio', + disabled: true, + span: 24, + options: [ + {value: "1", label: "需要重新发送"}, + {value: "2", label: "不需要重新发送"}, + ], + },] + }, + { + elCol: [{ + label: '返回信息', + prop: 'returnData', + tag: 'elInput', + type: 'textarea', + disabled: true, + span: 24, + }] + }, +] + +const basicsRules = { + sourceData: [{ + required: true, + message: '请输入源数据', + trigger: 'blur' + }], + targetData: [{ + required: true, + message: '请输入目标数据', + trigger: 'blur' + }], +} + +// 查看 +const formRowShow = [ + { + elCol: [{ + label: '发送者应用', + prop: 'sendApp', + tag: 'elSelect', + disabled: true, + options: [], + optionValue: 'id', + optionLabel: 'name', + },] + }, + { + elCol: [{ + label: '源数据', + prop: 'sourceData', + tag: 'elInput', + disabled: true, + type: 'textarea', + span: 24, + }] + }, + { + elCol: [{ + label: '目标数据', + prop: 'targetData', + tag: 'elInput', + disabled: true, + type: 'textarea', + span: 24, + }] + }, + { + elCol: [{ + label: '状态', + prop: 'status', + tag: 'elRadio', + disabled: true, + span: 24, + options: [ + {value: "1", label: "待发送"}, + {value: "2", label: "发送中"}, + {value: "3", label: "发送成功"}, + {value: "4", label: "发送失败"}, + ], + },] + }, + { + elCol: [{ + label: '错误状态', + prop: 'errorStatus', + tag: 'elRadio', + disabled: true, + span: 24, + options: [ + {value: "1", label: "需要重新发送"}, + {value: "2", label: "不需要重新发送"}, + ], + },] + }, + { + elCol: [{ + label: '返回信息', + prop: 'returnData', + tag: 'elInput', + type: 'textarea', + disabled: true, + span: 24, + }] + }, +] +// 处理 +const HandleformRowShow = [ + { + elCol: [{ + label: '发送者应用', + prop: 'sendApp', + tag: 'elSelect', + disabled: true, + options: [], + optionValue: 'id', + optionLabel: 'name', + },] + }, + { + elCol: [{ + label: '源数据', + prop: 'sourceData', + tag: 'elInput', + type: 'textarea', + span: 24, + }] + }, + { + elCol: [{ + label: '目标数据', + prop: 'targetData', + tag: 'elInput', + type: 'textarea', + span: 24, + }] + }, + { + elCol: [{ + label: '状态', + prop: 'status', + tag: 'elRadio', + disabled: true, + span: 24, + options: [ + {value: "1", label: "待发送"}, + {value: "2", label: "发送中"}, + {value: "3", label: "发送成功"}, + {value: "4", label: "发送失败"}, + ], + },] + }, + { + elCol: [{ + label: '错误状态', + prop: 'errorStatus', + tag: 'elRadio', + disabled: true, + span: 24, + options: [ + {value: "1", label: "需要重新发送"}, + {value: "2", label: "不需要重新发送"}, + ], + },] + }, + { + elCol: [{ + label: '返回信息', + prop: 'returnData', + tag: 'elInput', + type: 'textarea', + disabled: true, + span: 24, + }] + }, +] + + +export default { + tableColumnData, + formRow, + basicsRules, + formRowShow, + tableVersionColumn, + HandleformRowShow +} diff --git a/src/views/apiLogsError/index.vue b/src/views/apiLogsError/index.vue new file mode 100644 index 0000000..6067afb --- /dev/null +++ b/src/views/apiLogsError/index.vue @@ -0,0 +1,346 @@ + + + + + diff --git a/src/views/apiLogsError/rightDialog.vue b/src/views/apiLogsError/rightDialog.vue new file mode 100644 index 0000000..f396287 --- /dev/null +++ b/src/views/apiLogsError/rightDialog.vue @@ -0,0 +1,305 @@ + + + + + diff --git a/src/views/index_v2.vue b/src/views/index_v2.vue index 785585d..607296a 100644 --- a/src/views/index_v2.vue +++ b/src/views/index_v2.vue @@ -18,7 +18,7 @@
- +
{{ row.num }} @@ -135,6 +135,16 @@ export default { this.init() }, methods: { + logDetails(row){ + // 使用 $router 的路径构建完整 URL + const routeUrl = this.$router.resolve({ + path: '/apiLogsError', + query:{appId:row.appId} + }).href; + // 在新标签页中打开 + window.open(routeUrl ,'_blank'); + }, + // 初始化各个表单 async init() { this.getErrorLogs()