765e2449 by 任超

feat:上报日志

1 parent d19af6ad
......@@ -10,6 +10,7 @@
"dependencies": {
"@jiaminghi/data-view": "^2.10.0",
"axios": "^0.21.1",
"clipboard": "^2.0.11",
"core-js": "^3.6.5",
"echarts": "^4.6.0",
"js-cookie": "2.2.0",
......
......@@ -59,6 +59,19 @@ export const asyncRoutes = [
}
]
},
// 上报日志
{
path: '/reportLog',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/reportLog/index'),
name: 'reportLog',
meta: { title: '上报日志', icon: 'zsgl' }
}
]
},
// 接入业务信息
{
path: '/busineInfo',
......
<template>
<!-- 错误日志 -->
<dialogBox ref="error" isReset saveButton="关闭" divider width="50%" @submitForm="handleResclose" multiple title="错误日志">
<div class="xmlMessage">
{{ errorData }}
</div>
</dialogBox>
</template>
<script>
export default {
props: {
errorData: {
type: String,
default: ''
}
},
data () {
return {
}
},
methods: {
handleResclose () {
this.$refs.error.isHide();
}
}
}
</script>
\ No newline at end of file
<template>
<!-- 预览 -->
<dialogBox ref="preview" :isReset="false" divider :isButton="false" multiple title="XML报文">
<div class="xmlMessage">
{{ content }}
</div>
<div class="preview-dialog-button">
<el-button id="copy_text" type="primary" plain @click="handleSubmit"
:data-clipboard-text="content">复制报文</el-button>
<el-button @click="handleclose">关闭</el-button>
</div>
</dialogBox>
</template>
<script>
import Clipboard from 'clipboard'
export default {
props: {
content: {
type: String,
default: ''
},
},
data () {
return {
}
},
methods: {
handleSubmit () {
var _this = this;
var clipboard = new Clipboard('#copy_text');
clipboard.on('success', e => {
// 释放内存
this.$message({
message: '复制成功!',
type: 'success'
})
clipboard.destroy()
_this.$refs.preview.isHide()
})
clipboard.on('error', e => {
// 不支持复制
this.$message({
message: '该浏览器不支持自动复制',
type: 'warning'
});
// 释放内存
clipboard.destroy()
})
},
handleclose () {
this.$refs.preview.isHide();
}
}
}
</script>
<style scoped lang="scss">
.preview-dialog-button {
text-align: center;
margin: 20px 0;
}
</style>
\ No newline at end of file
<template>
<!-- 重新发报 -->
<dialogBox ref="resend" saveButton="确定" width="500px" divider @submitForm="handleResclose" multiple title="提示">
<div class="confirmDialog">您确定重新发送报文吗?</div>
</dialogBox>
</template>
<script>
import journal from '@/api/journal.js'
export default {
props: {
msgid: {
type: String,
default: ''
}
},
data () {
return {
}
},
methods: {
async handleResclose () {
try {
let res = await journal.sendXmlForPlat(this.msgid)
if (res.code == 200) {
this.$message({
message: res.message,
type: 'success'
})
this.$parent.featchData();
this.$refs.resend.isHide()
}
} catch (error) {
this.$message({
showClose: true,
message: '服务器出错,请稍后重试',
type: 'error'
})
this.$refs.resend.isHide()
}
}
}
}
</script>
\ No newline at end of file
<template>
<!-- 相应日志 -->
<dialogBox ref="response" isReset saveButton="关闭" divider @submitForm="handleResclose" multiple title="相应日志">
<div class="xmlMessage">
{{ journalData }}
</div>
</dialogBox>
</template>
<script>
export default {
props: {
journalData: {
type: String,
default: ''
}
},
data () {
return {
}
},
methods: {
handleResclose () {
this.$refs.response.isHide();
}
}
}
</script>
\ No newline at end of file
<template>
<!-- 重新转换 -->
<dialogBox ref="resend" saveButton="确定" width="500px" divider @submitForm="handleResclose" multiple title="提示">
<div class="confirmDialog">您确定重新抽取业务转换报文吗?</div>
</dialogBox>
</template>
<script>
import journal from '@/api/journal.js'
export default {
props: {
msgid: {
type: String,
default: ''
}
},
data () {
return {
}
},
methods: {
async handleResclose () {
try {
let res = await journal.sendXmlForPlat(this.msgid)
if (res.code == 200) {
this.$message({
message: res.message,
type: 'success'
})
this.$parent.featchData();
this.$refs.resend.isHide()
}
} catch (error) {
this.$message({
showClose: true,
message: '服务器出错,请稍后重试',
type: 'error'
})
}
}
}
}
</script>
\ No newline at end of file
import filter from '@/utils/filter.js'
class data extends filter {
constructor() {
super()
}
columns () {
return [
{
label: "行政区",
width: 120,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{scope.row.regorgid || '暂无'}</span>
</div>
)
},
},
{
label: "创建时间",
width: 135,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{scope.row.cjsj}</span>
</div>
)
},
},
{
label: "业务号",
width: 150,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{scope.row.ywh}</span>
</div>
)
},
},
{
label: "接入业务编码",
width: 100,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{scope.row.rectype}</span>
</div>
)
}
},
{
label: "接入业务名称",
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{this.busNameStatus(scope.row.rectype)}</span>
</div>
)
}
},
{
label: "上报时间",
width: 135,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{scope.row.sbsj}</span>
</div>
)
}
},
{
label: "上报状态",
width: 120,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{this.reportingStatus(scope.row.status)}</span>
</div>
)
}
},
{
label: "响应时间",
width: 135,
render: (h, scope) => {
return (
<div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
<span>{scope.row.xysj}</span>
</div>
)
}
}
]
}
}
export default new data()
.reportLog {
.progress {
position: absolute;
width: 200px;
z-index: 99999;
top: 50%;
left: 50%;
transform: translateX(-50%);
}
}
\ No newline at end of file