|
|
|
@ -4,10 +4,10 @@ |
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
<!-- 三级级联选择:平台 -> 模块 -> 功能页面 - rqrq --> |
|
|
|
<el-form-item label="平台"> |
|
|
|
<el-select |
|
|
|
v-model="queryData.platform" |
|
|
|
placeholder="请选择平台" |
|
|
|
style="width: 100px" |
|
|
|
<el-select |
|
|
|
v-model="queryData.platform" |
|
|
|
placeholder="请选择平台" |
|
|
|
style="width: 100px" |
|
|
|
@change="handlePlatformChange"> |
|
|
|
<el-option |
|
|
|
v-for="item in platformOptions" |
|
|
|
@ -19,10 +19,10 @@ |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="模块"> |
|
|
|
<el-select |
|
|
|
v-model="queryData.moduleName" |
|
|
|
placeholder="请选择模块" |
|
|
|
style="width: 150px" |
|
|
|
<el-select |
|
|
|
v-model="queryData.moduleName" |
|
|
|
placeholder="请选择模块" |
|
|
|
style="width: 150px" |
|
|
|
:disabled="!queryData.platform" |
|
|
|
@change="handleModuleChange"> |
|
|
|
<el-option |
|
|
|
@ -35,9 +35,9 @@ |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="功能页面"> |
|
|
|
<el-select |
|
|
|
v-model="queryData.url" |
|
|
|
placeholder="请选择功能页面" |
|
|
|
<el-select |
|
|
|
v-model="queryData.url" |
|
|
|
placeholder="请选择功能页面" |
|
|
|
style="width: 180px" |
|
|
|
:disabled="!queryData.moduleName" |
|
|
|
@change="handlePageChange"> |
|
|
|
@ -50,31 +50,6 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="按钮/功能"> |
|
|
|
<el-select |
|
|
|
v-model="queryData.functionButton" |
|
|
|
placeholder="全部按钮" |
|
|
|
style="width: 150px" |
|
|
|
filterable |
|
|
|
clearable> |
|
|
|
<el-option label="全部按钮" value=""></el-option> |
|
|
|
<el-option |
|
|
|
v-for="item in buttonOptions" |
|
|
|
:key="item" |
|
|
|
:label="item" |
|
|
|
:value="item"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="错误类型"> |
|
|
|
<el-select v-model="queryData.searchErrorType" placeholder="请选择" style="width: 100px" clearable> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="后端" value="BACKEND"></el-option> |
|
|
|
<el-option label="前端" value="FRONTEND"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="错误信息"> |
|
|
|
<el-input v-model="queryData.searchErrorMessage" style="width: 180px" placeholder="错误信息关键字" clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -86,14 +61,14 @@ |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<!-- 当前选中页面信息 - rqrq --> |
|
|
|
<div v-if="currentUrlConfig" class="url-info-card"> |
|
|
|
<div v-if="false" class="url-info-card"> |
|
|
|
<el-card shadow="never"> |
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
<span> |
|
|
|
<el-tag :type="currentUrlConfig.platform === 'PC' ? 'primary' : 'success'" size="small" style="margin-right: 10px"> |
|
|
|
{{ currentUrlConfig.platform }} |
|
|
|
</el-tag> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
<i class="el-icon-document"></i> |
|
|
|
{{ currentUrlConfig.moduleName }} - {{ currentUrlConfig.pageName }} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
@ -108,7 +83,7 @@ |
|
|
|
highlight-current-row |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="functionButton" label="功能/按钮" width="150" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-tag type="primary" size="small">{{ scope.row.functionButton }}</el-tag> |
|
|
|
@ -117,33 +92,27 @@ |
|
|
|
|
|
|
|
<el-table-column prop="seqNo" label="序号" width="60" header-align="center" align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="errorMessage" label="错误信息" min-width="280" header-align="center" show-overflow-tooltip> |
|
|
|
<el-table-column prop="errorMessage" label="错误信息" min-width="300" header-align="center" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span style="color: #F56C6C">{{ scope.row.errorMessage }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="errorType" label="类型" width="80" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-tag :type="scope.row.errorType === 'BACKEND' ? 'warning' : 'info'" size="mini"> |
|
|
|
{{ scope.row.errorType === 'BACKEND' ? '后端' : '前端' }} |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="errorType" label="类型" width="80" header-align="center" align="center">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <el-tag :type="scope.row.errorType === 'BACKEND' ? 'warning' : 'info'" size="mini">--> |
|
|
|
<!-- {{ scope.row.errorType === 'BACKEND' ? '后端' : '前端' }}--> |
|
|
|
<!-- </el-tag>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
|
|
<el-table-column prop="errorSource" label="错误来源" width="180" header-align="center" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span style="color: #909399; font-size: 12px">{{ scope.row.errorSource }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="defaultSolution" label="默认处理方式" min-width="220" header-align="center" show-overflow-tooltip> |
|
|
|
<el-table-column prop="defaultSolution" label="默认处理方式" min-width="250" header-align="center" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span style="color: #67C23A">{{ scope.row.defaultSolution || '-' }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="userSolution" label="用户补充处理方式" min-width="220" header-align="center" show-overflow-tooltip> |
|
|
|
<el-table-column prop="userSolution" label="用户补充处理方式" min-width="250" header-align="center" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span style="color: #409EFF">{{ scope.row.userSolution || '-' }}</span> |
|
|
|
</template> |
|
|
|
@ -175,7 +144,7 @@ |
|
|
|
:close-on-click-modal="false" |
|
|
|
v-drag |
|
|
|
width="800px"> |
|
|
|
|
|
|
|
|
|
|
|
<el-form :model="editForm" label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="12"> |
|
|
|
@ -201,7 +170,7 @@ |
|
|
|
<el-row style="margin-top: 52px"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="默认处理方式"> |
|
|
|
<el-input type="textarea" :rows="4" resize="none" v-model="editForm.defaultSolution" placeholder="请输入默认处理方式"></el-input> |
|
|
|
<el-input type="textarea" :rows="4" resize="none" v-model="editForm.defaultSolution" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -231,7 +200,6 @@ import { |
|
|
|
getModuleListByPlatform, |
|
|
|
getPageListByPlatformAndModule, |
|
|
|
getErrorDetailList, |
|
|
|
getFunctionButtonsByUrl, |
|
|
|
updateErrorDetail |
|
|
|
} from "@/api/sys/sop.js" |
|
|
|
|
|
|
|
@ -245,14 +213,11 @@ export default { |
|
|
|
platformOptions: [], |
|
|
|
moduleOptions: [], |
|
|
|
pageOptions: [], |
|
|
|
buttonOptions: [], |
|
|
|
currentUrlConfig: null, |
|
|
|
queryData: { |
|
|
|
platform: '', |
|
|
|
moduleName: '', |
|
|
|
url: '', |
|
|
|
functionButton: '', |
|
|
|
searchErrorType: '', |
|
|
|
searchErrorMessage: '', |
|
|
|
page: 1, |
|
|
|
limit: 20 |
|
|
|
@ -274,57 +239,91 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.height = window.innerHeight - 320 |
|
|
|
// 使用nextTick确保DOM渲染完成后设置高度 - rqrq |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 220 |
|
|
|
}) |
|
|
|
this.loadPlatformOptions() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 加载平台列表,默认选中PC - rqrq |
|
|
|
loadPlatformOptions() { |
|
|
|
getPlatformList({}).then(({ data }) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.platformOptions = data.rows || [] |
|
|
|
// 默认选中PC,如果没有PC则选中第一个 - rqrq |
|
|
|
if (this.platformOptions.includes('PC')) { |
|
|
|
this.queryData.platform = 'PC' |
|
|
|
} else if (this.platformOptions.length > 0) { |
|
|
|
this.queryData.platform = this.platformOptions[0] |
|
|
|
} |
|
|
|
// 加载模块列表 |
|
|
|
if (this.queryData.platform) { |
|
|
|
this.loadModuleOptions(this.queryData.platform, true) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 加载模块列表 - rqrq |
|
|
|
loadModuleOptions(platform, selectFirst) { |
|
|
|
getModuleListByPlatform({ platform: platform }).then(({ data }) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.moduleOptions = data.rows || [] |
|
|
|
// 默认选中第一个模块 - rqrq |
|
|
|
if (selectFirst && this.moduleOptions.length > 0) { |
|
|
|
this.queryData.moduleName = this.moduleOptions[0] |
|
|
|
this.loadPageOptions(platform, this.queryData.moduleName, true) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 加载功能页面列表 - rqrq |
|
|
|
loadPageOptions(platform, moduleName, selectFirst) { |
|
|
|
getPageListByPlatformAndModule({ |
|
|
|
platform: platform, |
|
|
|
moduleName: moduleName |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.pageOptions = data.rows || [] |
|
|
|
// 默认选中第一个功能页面 - rqrq |
|
|
|
if (selectFirst && this.pageOptions.length > 0) { |
|
|
|
this.queryData.url = this.pageOptions[0].url |
|
|
|
this.currentUrlConfig = this.pageOptions[0] |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 平台变化处理 - rqrq |
|
|
|
handlePlatformChange(platform) { |
|
|
|
this.queryData.moduleName = '' |
|
|
|
this.queryData.url = '' |
|
|
|
this.moduleOptions = [] |
|
|
|
this.pageOptions = [] |
|
|
|
this.buttonOptions = [] |
|
|
|
this.currentUrlConfig = null |
|
|
|
this.dataList = [] |
|
|
|
this.totalPage = 0 |
|
|
|
if (platform) { |
|
|
|
getModuleListByPlatform({ platform: platform }).then(({ data }) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.moduleOptions = data.rows || [] |
|
|
|
} |
|
|
|
}) |
|
|
|
// 加载模块列表并默认选中第一个 - rqrq |
|
|
|
this.loadModuleOptions(platform, true) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 模块变化处理 - rqrq |
|
|
|
handleModuleChange(moduleName) { |
|
|
|
this.queryData.url = '' |
|
|
|
this.pageOptions = [] |
|
|
|
this.buttonOptions = [] |
|
|
|
this.currentUrlConfig = null |
|
|
|
this.dataList = [] |
|
|
|
this.totalPage = 0 |
|
|
|
if (moduleName) { |
|
|
|
getPageListByPlatformAndModule({ |
|
|
|
platform: this.queryData.platform, |
|
|
|
moduleName: moduleName |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.pageOptions = data.rows || [] |
|
|
|
} |
|
|
|
}) |
|
|
|
// 加载功能页面列表并默认选中第一个 - rqrq |
|
|
|
this.loadPageOptions(this.queryData.platform, moduleName, true) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 功能页面变化处理 - rqrq |
|
|
|
handlePageChange(url) { |
|
|
|
this.buttonOptions = [] |
|
|
|
if (url) { |
|
|
|
this.currentUrlConfig = this.pageOptions.find(item => item.url === url) |
|
|
|
this.loadButtonOptions(url) |
|
|
|
this.getDataList() |
|
|
|
} else { |
|
|
|
this.currentUrlConfig = null |
|
|
|
@ -332,13 +331,7 @@ export default { |
|
|
|
this.totalPage = 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
loadButtonOptions(url) { |
|
|
|
getFunctionButtonsByUrl({ url: url }).then(({ data }) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.buttonOptions = data.rows || [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询数据 - rqrq |
|
|
|
getDataList() { |
|
|
|
if (!this.queryData.url) { |
|
|
|
this.$message.warning('请先选择功能页面') |
|
|
|
@ -362,25 +355,13 @@ export default { |
|
|
|
this.$alert('查询失败', '错误', { confirmButtonText: '确定' }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 重置查询 - rqrq |
|
|
|
resetQuery() { |
|
|
|
this.queryData = { |
|
|
|
platform: '', |
|
|
|
moduleName: '', |
|
|
|
url: '', |
|
|
|
functionButton: '', |
|
|
|
searchErrorType: '', |
|
|
|
searchErrorMessage: '', |
|
|
|
page: 1, |
|
|
|
limit: 20 |
|
|
|
} |
|
|
|
this.moduleOptions = [] |
|
|
|
this.pageOptions = [] |
|
|
|
this.buttonOptions = [] |
|
|
|
this.currentUrlConfig = null |
|
|
|
this.dataList = [] |
|
|
|
this.totalPage = 0 |
|
|
|
this.queryData.searchErrorMessage = '' |
|
|
|
this.pageIndex = 1 |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
// 编辑处理方式 - rqrq |
|
|
|
editSolution(row) { |
|
|
|
this.editForm = { |
|
|
|
url: row.url, |
|
|
|
@ -394,6 +375,7 @@ export default { |
|
|
|
} |
|
|
|
this.editDialogVisible = true |
|
|
|
}, |
|
|
|
// 保存处理方式 - rqrq |
|
|
|
saveSolution() { |
|
|
|
this.saveLoading = true |
|
|
|
const updateData = { |
|
|
|
@ -420,11 +402,13 @@ export default { |
|
|
|
this.saveLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 分页 - 每页条数变化 - rqrq |
|
|
|
sizeChangeHandle(val) { |
|
|
|
this.pageSize = val |
|
|
|
this.pageIndex = 1 |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
// 分页 - 当前页变化 - rqrq |
|
|
|
currentChangeHandle(val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.getDataList() |
|
|
|
|