首页异常日志可点开,处理异常日志标记成功
This commit is contained in:
parent
154a4251d8
commit
fb587e2c03
|
@ -21,7 +21,8 @@ const whiteList = [
|
|||
'/register',
|
||||
'/systemInit',
|
||||
'/databaseLogin',
|
||||
'/apiLogs'
|
||||
'/apiLogs',
|
||||
'/apiLogsError'
|
||||
|
||||
]
|
||||
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,346 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-layout
|
||||
ref="baseLayout"
|
||||
@onFuncBtn="onFuncBtn"
|
||||
:querySwitch="true"
|
||||
@search="handleSearchEvent"
|
||||
:isPage="true"
|
||||
@pageChange="handlePageChange"
|
||||
@onElSelect="onElSelect"
|
||||
:bodyHight="''"
|
||||
:search-btn-show="false"
|
||||
:reset-btn-show="false"
|
||||
>
|
||||
<div slot="main" slot-scope="{ tableHeight }">
|
||||
<base-table
|
||||
ref="baseTable"
|
||||
:showIndex="true"
|
||||
:funWidth="215"
|
||||
:funData="funData"
|
||||
@onFunc="onFunc"
|
||||
:tabLoading.sync="tabLoading"
|
||||
:tableHeight="'80vh'"
|
||||
:tableData="tableData"
|
||||
:tableColumn="tableColumnData"
|
||||
>
|
||||
<template v-slot:status="{ row }">
|
||||
<div style="width: 100%">
|
||||
<span v-if="row.status == '1'">待发送</span>
|
||||
<span v-else-if="row.status == '2'">发送中</span>
|
||||
<span v-else-if="row.status == '3'">发送成功</span>
|
||||
<span v-else-if="row.status == '4'">发送失败</span>
|
||||
<span v-else></span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:errorStatus="{ row }">
|
||||
<div style="width: 100%">
|
||||
<span>{{
|
||||
row.errorStatus === "1" ? "需要重新发送" : "不需要重新发送"
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</base-table>
|
||||
</div>
|
||||
</base-layout>
|
||||
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseLayout from "@/components/base/baseLayout";
|
||||
import baseTable from "@/components/base/baseTable";
|
||||
import rightDialog from "./rightDialog";
|
||||
import configData from "./configData";
|
||||
import {authApi} from "@/api/apis/auth";
|
||||
import {getApiModuleApi} from "@/api/apiChunks/index.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
baseLayout,
|
||||
baseTable,
|
||||
rightDialog,
|
||||
},
|
||||
props: {
|
||||
receiveApi: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
buttonList: [
|
||||
{
|
||||
menuName: "刷新",
|
||||
icon: "el-icon-refresh",
|
||||
btnFunction: "resetLoad",
|
||||
},
|
||||
], //按钮组
|
||||
appId:"",
|
||||
requirementList: [
|
||||
{
|
||||
placeholder: "发送者应用",
|
||||
prop: "sendApp",
|
||||
tag: "elSelect",
|
||||
options: [],
|
||||
optionValue: "id",
|
||||
optionLabel: "name",
|
||||
},
|
||||
{
|
||||
placeholder: "接受者应用",
|
||||
prop: "receiveApp",
|
||||
tag: "elSelect",
|
||||
options: [],
|
||||
optionValue: "id",
|
||||
optionLabel: "name",
|
||||
},
|
||||
{
|
||||
placeholder: "接受者api",
|
||||
prop: "receiveApi",
|
||||
tag: "elSelect",
|
||||
options: [],
|
||||
optionValue: "id",
|
||||
optionLabel: "apiName",
|
||||
},
|
||||
{
|
||||
placeholder: "开始日期",
|
||||
prop: "createTimeStart",
|
||||
tag: "elDatePicker",
|
||||
},
|
||||
{
|
||||
placeholder: "结束日期",
|
||||
prop: "createTimeEnd",
|
||||
tag: "elDatePicker",
|
||||
},
|
||||
{
|
||||
placeholder: "状态",
|
||||
prop: "status",
|
||||
tag: "elSelect",
|
||||
options: [
|
||||
{id: "3", label: "发送成功"},
|
||||
{id: "4", label: "发送失败"},
|
||||
],
|
||||
error_status_dist: {
|
||||
1: "需要重新发送",
|
||||
2: "不需要重新发送",
|
||||
},
|
||||
optionValue: "id",
|
||||
optionLabel: "label",
|
||||
},
|
||||
{
|
||||
placeholder: "源数据",
|
||||
prop: "sourceData",
|
||||
tag: "elInput",
|
||||
},
|
||||
{
|
||||
placeholder: "目标数据",
|
||||
prop: "targetData",
|
||||
tag: "elInput",
|
||||
},
|
||||
{
|
||||
placeholder: "返回信息",
|
||||
prop: "returnData",
|
||||
tag: "elInput",
|
||||
},
|
||||
], //查询模板list
|
||||
tabLoading: false,
|
||||
tableColumnData: configData.tableColumnData, //表头数据
|
||||
funData: [
|
||||
{
|
||||
color: "#6a9af1",
|
||||
text: "查看",
|
||||
},
|
||||
{
|
||||
color: "#d67a74",
|
||||
text: "处理",
|
||||
},
|
||||
|
||||
],
|
||||
tableData: [], //表格数据
|
||||
pageModel: {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
},
|
||||
queryModel: {
|
||||
theme: "",
|
||||
sendApp: "",
|
||||
sendApi: "",
|
||||
receiveApp: "",
|
||||
receiveApi: "",
|
||||
status: "",
|
||||
targetData: '',
|
||||
sourceData: '',
|
||||
returnData: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.GetMessageLogTableData();
|
||||
this.appId = this.$route.query.appId;
|
||||
console.log(this.appId);
|
||||
this.initSelect();
|
||||
|
||||
},
|
||||
methods: {
|
||||
async onElSelect(event, index, indexItem, model, row) {
|
||||
console.log(event, index, indexItem, model, row)
|
||||
|
||||
if (row.placeholder === '接受者应用') {
|
||||
this.$set(this.queryModel, 'receiveApi', '')
|
||||
this.$set(this.$refs.baseLayout.ruleForm, 'receiveApi', "")
|
||||
if (event) {
|
||||
const res = await authApi('sysApplicationService', 'application', 'thirdInterfacequeryAppApi', '', {
|
||||
appId: event
|
||||
})
|
||||
if(res.status ==200){
|
||||
this.requirementList[2].options = res.attribute
|
||||
}
|
||||
} else {
|
||||
this.requirementList[2].options = []
|
||||
}
|
||||
}
|
||||
},
|
||||
// 表格数据
|
||||
async GetMessageLogTableData() {
|
||||
this.tabLoading = true;
|
||||
let param = {
|
||||
...this.pageModel,
|
||||
...this.queryModel,
|
||||
};
|
||||
let res = await authApi(
|
||||
"sysApplicationService",
|
||||
"application",
|
||||
"thirdInterfacequeryAppApiLog",
|
||||
"",
|
||||
param
|
||||
);
|
||||
this.tabLoading = false;
|
||||
console.log(res, 112312312)
|
||||
if (res.status == "200") {
|
||||
this.tableData = res.attribute.list;
|
||||
this.$refs.baseLayout.setPageTotal(res.attribute.total);
|
||||
}
|
||||
},
|
||||
// 分页变化
|
||||
handlePageChange(val) {
|
||||
this.pageModel.pageNum = val.pageIndex;
|
||||
this.pageModel.pageSize = val.pageSize;
|
||||
this.GetMessageLogTableData();
|
||||
},
|
||||
// 按钮组
|
||||
onFuncBtn(btn) {
|
||||
this[btn.btnFunction]();
|
||||
},
|
||||
// 表格操作事件 查看 编辑 重新推送
|
||||
onFunc(index, row) {
|
||||
// 查看
|
||||
if (index == 0) {
|
||||
this.openLoading("detail");
|
||||
this.$refs.rightDialog.openDialog("show", row);
|
||||
}
|
||||
// 处理
|
||||
if (index == 1) {
|
||||
this.openLoading("detail");
|
||||
this.$refs.rightDialog.openDialog("handle", row);
|
||||
}
|
||||
// 重新推送
|
||||
// if (index == 2) {
|
||||
// this.$confirm("确认重新发送吗?", "提示", {
|
||||
// confirmButtonText: "确定",
|
||||
// cancelButtonText: "取消",
|
||||
// type: "warning",
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.openLoading("detail");
|
||||
// this.messageResendData(row.id);
|
||||
// })
|
||||
// .catch(() => {
|
||||
// this.$message({
|
||||
// type: "info",
|
||||
// message: "取消重新发送",
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
},
|
||||
async messageResendData(id) {
|
||||
let param = {
|
||||
id: id,
|
||||
};
|
||||
let res = await authApi(
|
||||
"sysMessageManageLogService",
|
||||
"messageManage",
|
||||
"resendData",
|
||||
"",
|
||||
param
|
||||
);
|
||||
if (res.status == "200") {
|
||||
this.$vmNews("重新发送成功!", "success");
|
||||
this.resetTable();
|
||||
}
|
||||
},
|
||||
// 重置表格
|
||||
resetTable() {
|
||||
this.pageModel.pageNum = 1;
|
||||
this.$refs.baseLayout.pageClear();
|
||||
this.GetMessageLogTableData();
|
||||
},
|
||||
// 搜索
|
||||
handleSearchEvent(form) {
|
||||
let data = this.$refs.baseLayout.ruleForm;
|
||||
this.queryModel = {...data}
|
||||
if (!data.status) {
|
||||
this.$vmNews("请选择状态")
|
||||
return
|
||||
}
|
||||
this.resetTable();
|
||||
},
|
||||
|
||||
|
||||
async initSelect() {
|
||||
const res = await getApiModuleApi({
|
||||
tl: "sysApplicationService",
|
||||
as: "application",
|
||||
dj: "thirdInterfacequeryApp"
|
||||
}, {
|
||||
"pageNum": 1,
|
||||
"pageSize": 999,
|
||||
|
||||
})
|
||||
console.log(res, 'res')
|
||||
this.requirementList[0].options = res.attribute.list
|
||||
this.requirementList[1].options = res.attribute.list
|
||||
this.queryModel = {
|
||||
receiveApp:this.appId,
|
||||
status: "4"
|
||||
}
|
||||
this.resetTable();
|
||||
|
||||
},
|
||||
|
||||
// async onElSelect(val, b, c, d, row) {
|
||||
// if (row.prop === 'sendApp') {
|
||||
// this.requirementList[1].options = []
|
||||
// this.$set(this.$refs.baseLayout.ruleForm, 'sendApi', "")
|
||||
// const res = await getApiModuleApi({
|
||||
// tl: "sysApplicationService",
|
||||
// as: "application",
|
||||
// dj: "queryAppApi",
|
||||
// }, {
|
||||
// "pageNum": 1,
|
||||
// "pageSize": 999,
|
||||
// appId: val
|
||||
// })
|
||||
// this.requirementList[1].options = res.attribute.list
|
||||
// console.log(res)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.clickTitle {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,305 @@
|
|||
<template>
|
||||
<div>
|
||||
<base-right-dialog
|
||||
ref="baseRightDialog"
|
||||
:footerShow="true"
|
||||
:dialogVisible.sync="dialogVisible"
|
||||
:title="dialogTitle + ' 消息管理日志'"
|
||||
@handleClose="handleDialogClose"
|
||||
:type="dialogType"
|
||||
:submitShow="submitShow"
|
||||
:size="'65%'"
|
||||
@handleConfirmClick="handleConfirmClick"
|
||||
>
|
||||
<base-form
|
||||
ref="basicsForm"
|
||||
:formRow="formRow"
|
||||
:isFunBtn="false"
|
||||
:rules="basicsRules"
|
||||
class="dialog_form"
|
||||
:spanWidth="`120px`"
|
||||
:loading="vLoading"
|
||||
style="padding-bottom:20px;"
|
||||
>
|
||||
</base-form>
|
||||
<el-button v-if="showSignButton" type="success" @click="signSuccess">标记成功</el-button>
|
||||
<el-button v-if="showSignButton" type="primary" @click="repush">重新推送</el-button>
|
||||
</base-right-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vueJsonEditor from 'vue-json-editor'
|
||||
import baseRightDialog from '@/components/base/baseRightDialog'
|
||||
import baseForm from '@/components/base/baseNewForm'
|
||||
import baseTable from '@/components/base/baseTable'
|
||||
import configData from './configData'
|
||||
import { authApi } from '@/api/apis/auth'
|
||||
import { getApiModuleApi } from '@/api/apiChunks/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
baseRightDialog,
|
||||
baseForm,
|
||||
baseTable,
|
||||
vueJsonEditor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showSignButton:false,
|
||||
dialogVisible: false,
|
||||
logid:'',
|
||||
dialogTitle: '',
|
||||
dialogType: '',
|
||||
formRow: configData.formRow,
|
||||
basicsRules: configData.basicsRules,
|
||||
vLoading: false,
|
||||
submitShow: true,
|
||||
sourceData: {},
|
||||
sourceDataFlag: true,
|
||||
targetData: {},
|
||||
targetDataFlag: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async signSuccess(){
|
||||
console.log(this.logid);
|
||||
let params = {
|
||||
id: this.logid,
|
||||
status:"3",
|
||||
}
|
||||
let res = await authApi(
|
||||
'sysMessageManageLogService',
|
||||
'messageManage',
|
||||
'updateEntity',
|
||||
'',
|
||||
params
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.handleDialogClose()
|
||||
this.$vmNews('标记成功', 'success')
|
||||
this.$emit('resetTable')
|
||||
}
|
||||
},
|
||||
|
||||
openDialog(type, row) {
|
||||
console.log(row.id)
|
||||
this.querysysAppService()
|
||||
// this.querysysAppApiService();
|
||||
this.formRow = configData.formRow
|
||||
this.submitShow = true
|
||||
// 编辑
|
||||
if (type == 'edit') {
|
||||
this.dialogTitle = '编辑'
|
||||
this.dialogType = 'edit'
|
||||
this.messageLogGetById(row.id)
|
||||
}
|
||||
// 查看
|
||||
if (type == 'show') {
|
||||
this.showSignButton = false
|
||||
this.submitShow = false
|
||||
this.formRow = configData.formRowShow
|
||||
this.dialogTitle = '查看'
|
||||
this.dialogType = 'show'
|
||||
this.messageLogGetById(row.id, row)
|
||||
}
|
||||
// 处理
|
||||
if (type == 'handle') {
|
||||
this.logid = row.id
|
||||
this.showSignButton = true
|
||||
this.submitShow = false
|
||||
this.formRow = configData.HandleformRowShow
|
||||
this.dialogTitle = '处理'
|
||||
this.dialogType = 'handle'
|
||||
this.messageLogGetById(row.id, row)
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
// 编辑详情
|
||||
async messageLogGetById(id, row) {
|
||||
let params = {
|
||||
id: id,
|
||||
status: row.status
|
||||
}
|
||||
let res = await authApi(
|
||||
'sysMessageManageLogService',
|
||||
'messageManage',
|
||||
'thirdInterfacequeryEntity',
|
||||
'',
|
||||
params
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.basicsForm.incomingParameters(res.attribute)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 实时保存 源数据
|
||||
onSourceDataJsonChange(value) {
|
||||
this.onSourceDataSave(value)
|
||||
},
|
||||
onSourceDataSave(value) {
|
||||
console.log(value)
|
||||
this.sourceData = value
|
||||
this.sourceDataFlag = true
|
||||
},
|
||||
onSourceDataError(value) {
|
||||
this.sourceDataFlag = false
|
||||
},
|
||||
checkSourceDataJson() {
|
||||
if (this.sourceDataFlag === false) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
// 实时保存 目标数据
|
||||
onTargetDataChange(value) {
|
||||
this.onTargetDataSave(value)
|
||||
},
|
||||
onTargetDataSave(value) {
|
||||
this.targetData = value
|
||||
this.targetDataFlag = true
|
||||
},
|
||||
onTargetDataError(value) {
|
||||
this.targetDataFlag = false
|
||||
},
|
||||
checkTargetDataJson() {
|
||||
if (this.targetDataFlag === false) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
// 弹窗关闭
|
||||
handleDialogClose() {
|
||||
this.$refs.basicsForm.resetFields()
|
||||
this.dialogVisible = false
|
||||
},
|
||||
// 弹窗确认按钮
|
||||
handleConfirmClick() {
|
||||
let checkSource = this.checkSourceDataJson()
|
||||
if (!checkSource) {
|
||||
this.$vmNews('源数据格式应为JSON格式!', 'warning')
|
||||
return
|
||||
}
|
||||
let checkTarget = this.checkTargetDataJson()
|
||||
if (!checkTarget) {
|
||||
this.$vmNews('目标数据格式应为JSON格式!', 'warning')
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
...this.$refs.basicsForm.ruleForm,
|
||||
sourceData: this.sourceData,
|
||||
targetData: this.targetData
|
||||
}
|
||||
if (this.dialogType == 'edit') {
|
||||
this.openLoading('submit')
|
||||
this.messageLogUpdateDto(params)
|
||||
}
|
||||
},
|
||||
// 编辑保存
|
||||
async messageLogUpdateDto(params) {
|
||||
let res = await authApi(
|
||||
'sysMessageManageLogService',
|
||||
'messageManage',
|
||||
'updateEntity',
|
||||
'',
|
||||
params
|
||||
)
|
||||
if (res.status == '200') {
|
||||
this.handleDialogClose()
|
||||
this.$vmNews('更新成功', 'success')
|
||||
this.$emit('resetTable')
|
||||
}
|
||||
},
|
||||
// 应用
|
||||
async querysysAppService() {
|
||||
const res = await getApiModuleApi({
|
||||
tl: 'sysApplicationService',
|
||||
as: 'application',
|
||||
dj: 'thirdInterfacequeryApp'
|
||||
}, {
|
||||
'pageNum': 1,
|
||||
'pageSize': 999
|
||||
})
|
||||
this.formRow[0].elCol[0].options = res.attribute.list
|
||||
// if (res.status == "200") {
|
||||
// this.formRow[1].elCol[0].options = res.attribute.list;
|
||||
// this.formRow[2].elCol[0].options = res.attribute.list;
|
||||
// }
|
||||
},
|
||||
// 应用者
|
||||
async querysysAppApiService() {
|
||||
let params = {
|
||||
pageSize: 9999,
|
||||
pageNum: 1
|
||||
}
|
||||
let res = await authApi(
|
||||
'appApiService',
|
||||
'appApi',
|
||||
'queryPage',
|
||||
'',
|
||||
params
|
||||
)
|
||||
if (res.status == '200') {
|
||||
// this.formRow[1].elCol[1].options = res.attribute.list;
|
||||
// this.formRow[2].elCol[1].options = res.attribute.list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.code-json-editor {
|
||||
/* jsoneditor右上角默认有一个链接,加css去掉 */
|
||||
|
||||
/deep/ .jsoneditor-poweredBy {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/deep/ .ace-jsoneditor {
|
||||
height: 150px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep textarea.el-textarea__inner {
|
||||
min-height: 150px !important;
|
||||
}
|
||||
|
||||
.dialogList {
|
||||
padding: 16px 0;
|
||||
border-top: 1px solid #dcdfe6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.updateBtn {
|
||||
border: 1px solid #ebedf1;
|
||||
padding: 5px 0;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.updateBtn:hover {
|
||||
color: #1890ff;
|
||||
border-color: #badeff;
|
||||
background-color: #e8f4ff;
|
||||
}
|
||||
|
||||
::v-deep .el-table__body-wrapper.is-scrolling-none {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
::v-deep .app-container {
|
||||
height: auto !important;
|
||||
}
|
||||
</style>
|
|
@ -18,7 +18,7 @@
|
|||
<div class="errList">
|
||||
<div class="errItem" v-for="row in errList[index]">
|
||||
<div class="img">
|
||||
<img :src="row.imgUrl" alt="" @error="handleImageError(row)"/>
|
||||
<img :src="row.imgUrl" alt="" @error="handleImageError(row)" @click="logDetails(row)"/>
|
||||
</div>
|
||||
<div class="num">
|
||||
{{ 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()
|
||||
|
|
Loading…
Reference in New Issue