765e2449 by 任超

feat:上报日志

1 parent d19af6ad
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
10 "dependencies": { 10 "dependencies": {
11 "@jiaminghi/data-view": "^2.10.0", 11 "@jiaminghi/data-view": "^2.10.0",
12 "axios": "^0.21.1", 12 "axios": "^0.21.1",
13 "clipboard": "^2.0.11",
13 "core-js": "^3.6.5", 14 "core-js": "^3.6.5",
14 "echarts": "^4.6.0", 15 "echarts": "^4.6.0",
15 "js-cookie": "2.2.0", 16 "js-cookie": "2.2.0",
......
...@@ -59,6 +59,19 @@ export const asyncRoutes = [ ...@@ -59,6 +59,19 @@ export const asyncRoutes = [
59 } 59 }
60 ] 60 ]
61 }, 61 },
62 // 上报日志
63 {
64 path: '/reportLog',
65 component: Layout,
66 children: [
67 {
68 path: 'index',
69 component: () => import('@/views/reportLog/index'),
70 name: 'reportLog',
71 meta: { title: '上报日志', icon: 'zsgl' }
72 }
73 ]
74 },
62 // 接入业务信息 75 // 接入业务信息
63 { 76 {
64 path: '/busineInfo', 77 path: '/busineInfo',
......
1 <template>
2 <!-- 错误日志 -->
3 <dialogBox ref="error" isReset saveButton="关闭" divider width="50%" @submitForm="handleResclose" multiple title="错误日志">
4 <div class="xmlMessage">
5 {{ errorData }}
6 </div>
7 </dialogBox>
8 </template>
9
10 <script>
11 export default {
12 props: {
13 errorData: {
14 type: String,
15 default: ''
16 }
17 },
18 data () {
19 return {
20 }
21 },
22 methods: {
23 handleResclose () {
24 this.$refs.error.isHide();
25 }
26 }
27 }
28 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <!-- 预览 -->
3 <dialogBox ref="preview" :isReset="false" divider :isButton="false" multiple title="XML报文">
4 <div class="xmlMessage">
5 {{ content }}
6 </div>
7 <div class="preview-dialog-button">
8 <el-button id="copy_text" type="primary" plain @click="handleSubmit"
9 :data-clipboard-text="content">复制报文</el-button>
10 <el-button @click="handleclose">关闭</el-button>
11 </div>
12 </dialogBox>
13 </template>
14
15 <script>
16 import Clipboard from 'clipboard'
17 export default {
18 props: {
19 content: {
20 type: String,
21 default: ''
22 },
23 },
24 data () {
25 return {
26 }
27 },
28 methods: {
29 handleSubmit () {
30 var _this = this;
31 var clipboard = new Clipboard('#copy_text');
32 clipboard.on('success', e => {
33 // 释放内存
34 this.$message({
35 message: '复制成功!',
36 type: 'success'
37 })
38 clipboard.destroy()
39 _this.$refs.preview.isHide()
40 })
41 clipboard.on('error', e => {
42 // 不支持复制
43 this.$message({
44 message: '该浏览器不支持自动复制',
45 type: 'warning'
46 });
47 // 释放内存
48 clipboard.destroy()
49 })
50 },
51 handleclose () {
52 this.$refs.preview.isHide();
53 }
54 }
55 }
56 </script>
57 <style scoped lang="scss">
58 .preview-dialog-button {
59 text-align: center;
60 margin: 20px 0;
61 }
62 </style>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <!-- 重新发报 -->
3 <dialogBox ref="resend" saveButton="确定" width="500px" divider @submitForm="handleResclose" multiple title="提示">
4 <div class="confirmDialog">您确定重新发送报文吗?</div>
5 </dialogBox>
6 </template>
7
8 <script>
9 import journal from '@/api/journal.js'
10 export default {
11 props: {
12 msgid: {
13 type: String,
14 default: ''
15 }
16 },
17 data () {
18 return {
19 }
20 },
21 methods: {
22 async handleResclose () {
23 try {
24 let res = await journal.sendXmlForPlat(this.msgid)
25 if (res.code == 200) {
26 this.$message({
27 message: res.message,
28 type: 'success'
29 })
30 this.$parent.featchData();
31 this.$refs.resend.isHide()
32 }
33 } catch (error) {
34 this.$message({
35 showClose: true,
36 message: '服务器出错,请稍后重试',
37 type: 'error'
38 })
39 this.$refs.resend.isHide()
40 }
41 }
42 }
43 }
44 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <!-- 相应日志 -->
3 <dialogBox ref="response" isReset saveButton="关闭" divider @submitForm="handleResclose" multiple title="相应日志">
4 <div class="xmlMessage">
5 {{ journalData }}
6 </div>
7 </dialogBox>
8 </template>
9
10 <script>
11 export default {
12 props: {
13 journalData: {
14 type: String,
15 default: ''
16 }
17 },
18 data () {
19 return {
20 }
21 },
22 methods: {
23 handleResclose () {
24 this.$refs.response.isHide();
25 }
26 }
27 }
28 </script>
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <!-- 重新转换 -->
3 <dialogBox ref="resend" saveButton="确定" width="500px" divider @submitForm="handleResclose" multiple title="提示">
4 <div class="confirmDialog">您确定重新抽取业务转换报文吗?</div>
5 </dialogBox>
6 </template>
7
8 <script>
9 import journal from '@/api/journal.js'
10 export default {
11 props: {
12 msgid: {
13 type: String,
14 default: ''
15 }
16 },
17 data () {
18 return {
19 }
20 },
21 methods: {
22 async handleResclose () {
23 try {
24 let res = await journal.sendXmlForPlat(this.msgid)
25 if (res.code == 200) {
26 this.$message({
27 message: res.message,
28 type: 'success'
29 })
30 this.$parent.featchData();
31 this.$refs.resend.isHide()
32 }
33 } catch (error) {
34 this.$message({
35 showClose: true,
36 message: '服务器出错,请稍后重试',
37 type: 'error'
38 })
39 }
40 }
41 }
42 }
43 </script>
...\ No newline at end of file ...\ No newline at end of file
1 import filter from '@/utils/filter.js'
2 class data extends filter {
3 constructor() {
4 super()
5 }
6 columns () {
7 return [
8 {
9 label: "行政区",
10 width: 120,
11 render: (h, scope) => {
12 return (
13 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
14 <span>{scope.row.regorgid || '暂无'}</span>
15 </div>
16 )
17 },
18 },
19 {
20 label: "创建时间",
21 width: 135,
22 render: (h, scope) => {
23 return (
24 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
25 <span>{scope.row.cjsj}</span>
26 </div>
27 )
28 },
29 },
30 {
31 label: "业务号",
32 width: 150,
33 render: (h, scope) => {
34 return (
35 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
36 <span>{scope.row.ywh}</span>
37 </div>
38 )
39 },
40 },
41 {
42 label: "接入业务编码",
43 width: 100,
44 render: (h, scope) => {
45 return (
46 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
47 <span>{scope.row.rectype}</span>
48 </div>
49 )
50 }
51 },
52 {
53 label: "接入业务名称",
54 render: (h, scope) => {
55 return (
56 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
57 <span>{this.busNameStatus(scope.row.rectype)}</span>
58 </div>
59 )
60 }
61 },
62 {
63 label: "上报时间",
64 width: 135,
65 render: (h, scope) => {
66 return (
67 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
68 <span>{scope.row.sbsj}</span>
69 </div>
70 )
71 }
72 },
73 {
74 label: "上报状态",
75 width: 120,
76 render: (h, scope) => {
77 return (
78 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
79 <span>{this.reportingStatus(scope.row.status)}</span>
80 </div>
81 )
82 }
83 },
84 {
85 label: "响应时间",
86 width: 135,
87 render: (h, scope) => {
88 return (
89 <div class={{ 'warning': scope.row.status == 6, 'bad': (scope.row.status == 2 || scope.row.status == 3 || scope.row.status == 5) }}>
90 <span>{scope.row.xysj}</span>
91 </div>
92 )
93 }
94 }
95 ]
96 }
97 }
98 export default new data()
1 .reportLog {
2 .progress {
3 position: absolute;
4 width: 200px;
5 z-index: 99999;
6 top: 50%;
7 left: 50%;
8 transform: translateX(-50%);
9 }
10 }
...\ No newline at end of file ...\ No newline at end of file