4c178603 by 任超

style:上报报文查询

1 parent 17929302
......@@ -3,8 +3,6 @@ import business from '@/api/business'
let mixin = {
data () {
return {
xml: '',
message: '',
formData: {
pageSize: 10
}
......
......@@ -46,29 +46,29 @@ export const asyncRoutes = [
}
]
},
// 登簿日志
// 上报日志
{
path: '/registerLog',
path: '/reportLog',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/registerLog/index'),
name: 'registerLog',
meta: { title: '登簿日志', icon: 'zhcx' }
component: () => import('@/views/reportLog/index'),
name: 'reportLog',
meta: { title: '上报报文查询', icon: 'zsgl' }
}
]
},
// 上报日志
// 登簿日志
{
path: '/reportLog',
path: '/registerLog',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/reportLog/index'),
name: 'reportLog',
meta: { title: '上报日志', icon: 'zsgl' }
component: () => import('@/views/registerLog/index'),
name: 'registerLog',
meta: { title: '登簿日志', icon: 'zhcx' }
}
]
},
......
......@@ -177,6 +177,10 @@ div:focus {
display: block;
}
.marginbtm5 {
margin-bottom: 5px !important;
}
.clearfix {
&:after {
visibility: hidden;
......
<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