4c178603 by 任超

style:上报报文查询

1 parent 17929302
...@@ -3,8 +3,6 @@ import business from '@/api/business' ...@@ -3,8 +3,6 @@ import business from '@/api/business'
3 let mixin = { 3 let mixin = {
4 data () { 4 data () {
5 return { 5 return {
6 xml: '',
7 message: '',
8 formData: { 6 formData: {
9 pageSize: 10 7 pageSize: 10
10 } 8 }
......
...@@ -46,29 +46,29 @@ export const asyncRoutes = [ ...@@ -46,29 +46,29 @@ export const asyncRoutes = [
46 } 46 }
47 ] 47 ]
48 }, 48 },
49 // 登簿日志 49 // 上报日志
50 { 50 {
51 path: '/registerLog', 51 path: '/reportLog',
52 component: Layout, 52 component: Layout,
53 children: [ 53 children: [
54 { 54 {
55 path: 'index', 55 path: 'index',
56 component: () => import('@/views/registerLog/index'), 56 component: () => import('@/views/reportLog/index'),
57 name: 'registerLog', 57 name: 'reportLog',
58 meta: { title: '登簿日志', icon: 'zhcx' } 58 meta: { title: '上报报文查询', icon: 'zsgl' }
59 } 59 }
60 ] 60 ]
61 }, 61 },
62 // 上报日志 62 // 登簿日志
63 { 63 {
64 path: '/reportLog', 64 path: '/registerLog',
65 component: Layout, 65 component: Layout,
66 children: [ 66 children: [
67 { 67 {
68 path: 'index', 68 path: 'index',
69 component: () => import('@/views/reportLog/index'), 69 component: () => import('@/views/registerLog/index'),
70 name: 'reportLog', 70 name: 'registerLog',
71 meta: { title: '上报日志', icon: 'zsgl' } 71 meta: { title: '登簿日志', icon: 'zhcx' }
72 } 72 }
73 ] 73 ]
74 }, 74 },
......
...@@ -177,6 +177,10 @@ div:focus { ...@@ -177,6 +177,10 @@ div:focus {
177 display: block; 177 display: block;
178 } 178 }
179 179
180 .marginbtm5 {
181 margin-bottom: 5px !important;
182 }
183
180 .clearfix { 184 .clearfix {
181 &:after { 185 &:after {
182 visibility: hidden; 186 visibility: hidden;
......
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 <template> 1 <template>
2 <div class="reportLog from-clues"> 2 <div class="reportLog from-clues">
3 <div class="from-clues-header"> 3 <div class="from-clues-header">
4 <el-form ref="form" :model="form" label-width="80px"> 4 <el-form ref="form" :model="form" label-width="100px">
5 <el-row> 5 <el-row class="marginbtm5">
6 <el-col :span="5"> 6 <el-col :span="6">
7 <el-form-item label="业务号"> 7 <el-form-item label="不动产单元号">
8 <el-input v-model="form.ywh" placeholder="业务号"></el-input> 8 <el-input v-model="form.bdcdyh" class="width100" placeholder="不动产单元号"></el-input>
9 </el-form-item> 9 </el-form-item>
10 </el-col> 10 </el-col>
11 <el-col :span="5"> 11 <el-col :span="6">
12 <el-form-item label="接入业务名称" label-width="120px"> 12 <el-form-item label="开始日期">
13 <el-select filterable v-model="form.rectype" ref="selectref" @visible-change="isShowSelectOptions" 13 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
14 clearable placeholder="请选择"> 14 clearable v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker>
15 <el-option v-for="item in $store.getters.businessInfo" :key="item.jrywbm" :label="item.jrywmc" 15 </el-form-item>
16 :value="item.jrywbm"> 16 </el-col>
17 </el-option> 17 <el-col :span="6">
18 </el-select> 18 <el-form-item label="结束日期">
19 <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
20 clearable v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker>
19 </el-form-item> 21 </el-form-item>
20 </el-col> 22 </el-col>
21 <el-col :span="5"> 23 <el-col :span="6">
22 <el-form-item label="上报状态"> 24 <el-form-item label="业务号">
23 <el-select v-model="form.status" ref="selectReporting" @visible-change="isShowSelectOptions" clearable 25 <el-input v-model="form.ywh" class="width100" placeholder="业务号"></el-input>
24 placeholder="上报状态"> 26 </el-form-item>
27 </el-col>
28 </el-row>
29 <el-row>
30 <el-col :span="6">
31 <el-form-item label="响应结果">
32 <el-select v-model="form.status" class="width100" clearable placeholder="响应结果">
25 <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value"> 33 <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
26 </el-option> 34 </el-option>
27 </el-select> 35 </el-select>
28 </el-form-item> 36 </el-form-item>
29 </el-col> 37 </el-col>
30 38
31 <el-col :span="5"> 39 <el-col :span="6">
32 <el-form-item label="行政区"> 40 <el-form-item label="行政区">
33 <el-select v-model="form.pcode" clearable placeholder="行政区"> 41 <el-select v-model="form.pcode" class="width100" clearable placeholder="行政区">
34 <el-option v-for="item in xzqOptions" :key="item.value" :label="item.label" :value="item.value"> 42 <el-option v-for="item in xzqOptions" :key="item.value" :label="item.label" :value="item.value">
35 </el-option> 43 </el-option>
36 </el-select> 44 </el-select>
37 </el-form-item> 45 </el-form-item>
38 </el-col> 46 </el-col>
39 <el-col :span="4" class="btnColRight"> 47 <el-col :span="12" class="btnColRight">
40 <el-button type="primary" @click="handleSubmit">查询结果</el-button> 48 <el-button type="primary" @click="handleSubmit">查询结果</el-button>
41 </el-col> 49 </el-col>
42 </el-row> 50 </el-row>
43 </el-form> 51 </el-form>
44 </div> 52 </div>
45 <div class="from-clues-content"> 53 <div class="from-clues-content">
46 <lb-table ref="table" :page-size="pageData.size" :current-page.sync="pageData.current" :total="pageData.total" 54 <lb-table ref="table" :heightNum="300" :page-size="pageData.size" :current-page.sync="pageData.current"
47 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" 55 :total="pageData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
48 :data="tableData.data"> 56 :column="tableData.columns" :data="tableData.data">
49 </lb-table> 57 </lb-table>
50 </div> 58 </div>
51 <!-- 相应日志 -->
52 <response-dialog ref="responseLog" :journalData="journalData" />
53 <!-- 错误日志 -->
54 <errorLog-dialog ref="errorLog" :errorData="errorData" />
55 <!-- 预览 -->
56 <preview-dialog :content="XMLData" ref="previewLog" />
57 <!-- 编辑 --> 59 <!-- 编辑 -->
58 <edit-dialog ref="editLog" :bsmSjsb="bsmSjsb" :diaData="diaData" /> 60 <edit-dialog ref="editLog" :bsmSjsb="bsmSjsb" :diaData="diaData" />
59 <!-- 重新发报 -->
60 <resend-dialog ref="resendLog" :msgid="msgid" />
61 <!-- 重新转换 -->
62 <retransfer-dialog ref="retransfer" />
63 </div> 61 </div>
64 </template> 62 </template>
65 63
...@@ -69,33 +67,42 @@ import data from "./data" ...@@ -69,33 +67,42 @@ import data from "./data"
69 import journal from '@/api/journal.js' 67 import journal from '@/api/journal.js'
70 import tableMixin from '@/mixins/tableMixin.js' 68 import tableMixin from '@/mixins/tableMixin.js'
71 import dataReporting from '@/api/dataReporting' 69 import dataReporting from '@/api/dataReporting'
72 import responseDialog from './components/response-dialog.vue'
73 import errorLogDialog from './components/errorLog-dialog.vue'
74 import previewDialog from './components/preview-dialog.vue'
75 import resendDialog from './components/resend-dialog.vue'
76 import retransferDialog from './components/retransfer-dialog.vue'
77 import editDialog from '@/components/dataDetails/edit-dialog.vue' 70 import editDialog from '@/components/dataDetails/edit-dialog.vue'
78 export default { 71 export default {
79 name: "reportLog", 72 name: "reportLog",
80 mixins: [tableMixin], 73 mixins: [tableMixin],
81 components: { 74 components: {
82 responseDialog,
83 previewDialog,
84 resendDialog,
85 editDialog, 75 editDialog,
86 errorLogDialog,
87 retransferDialog
88 }, 76 },
89 data () { 77 data () {
90 return { 78 return {
91 msgid: '', 79 // 开始结束日期限制
92 // 响应日志 80 pickerOptionsStart: {
93 journalData: '', 81 disabledDate: (time) => {
94 errorData: '', 82 if (this.form.endTime) {
95 XMLData: '', 83 return (
84 time.getTime() >= new Date(this.form.endTime).getTime()
85 );
86 }
87 }
88 },
89 // 结束日期限制
90 pickerOptionsEnd: {
91 disabledDate: (time) => {
92 if (this.form.startTime) {
93 return (
94 time.getTime() <= new Date(this.form.startTime).getTime()
95 );
96 }
97 }
98 },
99 bsmSjsb: '',
100 diaData: [],
96 form: { 101 form: {
102 bdcdyh: '',
103 startTime: '',
104 endTime: '',
97 ywh: '', 105 ywh: '',
98 rectype: '',
99 status: '', 106 status: '',
100 pcode: '', 107 pcode: '',
101 currentPage: 1 108 currentPage: 1
...@@ -108,40 +115,7 @@ export default { ...@@ -108,40 +115,7 @@ export default {
108 index: this.indexMethod, 115 index: this.indexMethod,
109 }].concat(data.columns()).concat([ 116 }].concat(data.columns()).concat([
110 { 117 {
111 width: 135,
112 label: "XML报文",
113 headerAlign: 'center',
114 align: 'left',
115 render: (h, scope) => {
116 return (
117 <div>
118 <el-button
119 type="text"
120 size="mini"
121 style="color:#67C23A"
122 icon="el-icon-view"
123 v-show={['1', '4', '5', '6', '7', '8'].includes(scope.row.status)}
124 onClick={() => { this.handlePreview(scope.$index, scope.row) }}
125 >
126 预览
127 </el-button>
128 <el-button
129 type="text"
130 style="margin-bottom:5px"
131 size="mini"
132 icon="el-icon-folder"
133 onClick={() => { this.handleResponseLog(scope.row) }}
134 v-show={['5', '7'].includes(scope.row.status)}
135 >
136 响应日志
137 </el-button>
138 </div>
139 );
140 },
141 },
142 {
143 label: "操作", 118 label: "操作",
144 width: 170,
145 headerAlign: 'center', 119 headerAlign: 'center',
146 align: 'right', 120 align: 'right',
147 render: (h, scope) => { 121 render: (h, scope) => {
...@@ -153,63 +127,13 @@ export default { ...@@ -153,63 +127,13 @@ export default {
153 icon="el-icon-edit" 127 icon="el-icon-edit"
154 style="margin-left: 10px" 128 style="margin-left: 10px"
155 onClick={() => { this.handleEdit(scope.$index, scope.row) }} 129 onClick={() => { this.handleEdit(scope.$index, scope.row) }}
156 v-show={scope.row.status == 3}
157 > 130 >
158 编辑 131 编辑
159 </el-button> 132 </el-button>
160 <el-button
161 type="text"
162 size="mini"
163 style="color:#67C23A"
164 icon="el-icon-folder-opened"
165 onClick={() => { this.handleReissue(scope.row) }}
166 v-show={scope.row.status == 1 || scope.row.status == 5}
167 >
168 重新上报
169 </el-button>
170 <el-button
171 type="text"
172 icon="el-icon-folder-checked"
173 v-show={scope.row.status == 3 || scope.row.status == 9}
174 onClick={() => { this.handleInspection(scope.row) }}
175 >
176 数据校验
177 </el-button>
178 <el-button
179 v-show={scope.row.status == 2 || scope.row.status == 3}
180 type="text"
181 size="mini"
182 style="margin-left:0;color:#F56C6C"
183 icon="el-icon-s-order"
184 onClick={() => { this.handleErrorLog(scope.row) }}
185 >
186 错误日志
187 </el-button>
188
189 <el-button
190 v-show={scope.row.status == 9}
191 type="text"
192 size="mini"
193 icon="el-icon-view"
194 onClick={() => { this.handleDatapreview(scope.row) }}
195 >
196 数据预览
197 </el-button>
198
199 <el-button
200 v-show={scope.row.status == 2 || scope.row.status == 0}
201 type="text"
202 icon="el-icon-copy-document"
203 size="mini"
204 onClick={() => { this.handleRetransfer(scope.row) }}
205 >
206 重新抽取
207 </el-button>
208 </div> 133 </div>
209 ); 134 )
210 }, 135 }
211 }, 136 }
212
213 ]), 137 ]),
214 data: [] 138 data: []
215 }, 139 },
...@@ -218,50 +142,8 @@ export default { ...@@ -218,50 +142,8 @@ export default {
218 pageSize: 15, 142 pageSize: 15,
219 current: 1, 143 current: 1,
220 }, 144 },
221 diaData: null,
222 bsmSjsb: '',
223 // 上报状态 145 // 上报状态
224 statusOptions: [ 146 statusOptions: [
225 {
226 value: '0',
227 label: '待抽取'
228 },
229 {
230 value: '2',
231 label: '内部错误'
232 },
233 {
234 value: '9',
235 label: '待校验'
236 },
237 {
238 value: '3',
239 label: '本地校验失败'
240 },
241 {
242 value: '1',
243 label: '待上报'
244 },
245 {
246 value: '4',
247 label: '上报成功等待响应'
248 },
249 {
250 value: '5',
251 label: '上报时发生错误'
252 },
253 {
254 value: '6',
255 label: '本地上报成功,查询上报结果错误'
256 },
257 {
258 value: '7',
259 label: '本地上报成功,上级也上报成功'
260 },
261 {
262 value: '8',
263 label: '本地上报成功,上级上报失败'
264 }
265 ], 147 ],
266 // 行政区 148 // 行政区
267 xzqOptions: [ 149 xzqOptions: [
...@@ -284,22 +166,7 @@ export default { ...@@ -284,22 +166,7 @@ export default {
284 ] 166 ]
285 } 167 }
286 }, 168 },
287 watch: {
288 'tableData.data' (val) {
289 this.doLayout();
290 }
291 },
292 methods: { 169 methods: {
293 doLayout () {
294 this.$nextTick(() => {
295 this.$refs.table.doLayout()
296 })
297 },
298 // 是否显示下拉框
299 isShowSelectOptions (e) {
300 if (!e) this.$refs.selectref.blur()
301 if (!e) this.$refs.selectReporting.blur()
302 },
303 async featchData () { 170 async featchData () {
304 try { 171 try {
305 this.form = Object.assign(this.form, this.formData) 172 this.form = Object.assign(this.form, this.formData)
...@@ -319,38 +186,6 @@ export default { ...@@ -319,38 +186,6 @@ export default {
319 this.message = error 186 this.message = error
320 } 187 }
321 }, 188 },
322 async handleResponseLog (row) {
323 try {
324 let { result: res } = await journal.queryResponseLog(row.msgid)
325 if (res != null) {
326 this.$refs.responseLog.$refs.response.isShow()
327 this.journalData = res
328 } else {
329 this.$message('响应日志为空')
330 }
331 } catch (error) {
332 this.$alert(error, '提示', {
333 confirmButtonText: '确定',
334 type: 'error'
335 })
336 }
337 },
338 async handlePreview (index, row) {
339 try {
340 let res = await journal.queryXML(row.msgid)
341 if (res != null) {
342 this.XMLData = res.result
343 this.$refs.previewLog.$refs.preview.isShow()
344 } else {
345 this.$message('报文为空')
346 }
347 } catch (error) {
348 this.$alert(error, '提示', {
349 confirmButtonText: '确定',
350 type: 'error'
351 })
352 }
353 },
354 async handleEdit (index, row) { 189 async handleEdit (index, row) {
355 try { 190 try {
356 let { result: res, message } = await dataReporting.getQltFwFdcqYzByCondition(row.msgid) 191 let { result: res, message } = await dataReporting.getQltFwFdcqYzByCondition(row.msgid)
...@@ -362,97 +197,12 @@ export default { ...@@ -362,97 +197,12 @@ export default {
362 } else { 197 } else {
363 this.$message(message) 198 this.$message(message)
364 } 199 }
365
366 } catch (error) { 200 } catch (error) {
367 this.$alert(error, '提示', { 201 this.$alert(error, '提示', {
368 confirmButtonText: '确定', 202 confirmButtonText: '确定',
369 type: 'error' 203 type: 'error'
370 }) 204 })
371 } 205 }
372 },
373 handleReissue (row) {
374 this.msgid = row.msgid
375 this.$refs.resendLog.$refs.resend.isShow()
376 },
377 // 错误日志
378 async handleErrorLog (row) {
379 try {
380 let res = await journal.queryErrorLog(row.msgid)
381 this.errorData = res.message
382 this.$refs.errorLog.$refs.error.isShow()
383 } catch (error) {
384 this.$alert(error, '提示', {
385 confirmButtonText: '确定',
386 type: 'error'
387 })
388 }
389 },
390 // 重新抽取
391 handleRetransfer (row) {
392 let _this = this
393 this.$confirm('此操作将重新抽取该文件, 是否继续?', '提示', {
394 confirmButtonText: '确定',
395 cancelButtonText: '取消',
396 type: 'warning'
397 }).then(async () => {
398 this.extractLoading = true
399 try {
400 let res = await journal.extractionAndInsertData(row.msgid)
401 if (res.code == 200) {
402 _this.$message({
403 message: res.result,
404 type: 'success'
405 });
406 _this.featchData()
407 }
408 } catch (error) {
409 _this.$confirm(error, '提示', {
410 confirmButtonText: '确定',
411 type: 'warning'
412 }).then(() => {
413 _this.featchData()
414 })
415 }
416 this.extractLoading = false
417 }).catch(() => {
418 this.$message({
419 type: 'info',
420 message: '已取消'
421 });
422 });
423 },
424 // 检验报文
425 async handleInspection (row) {
426 try {
427 let res = await journal.checkSjsbXmlDatas(row.msgid)
428 if (res.code == 200) {
429 this.$message({
430 message: '校验成功',
431 type: 'success'
432 });
433 }
434 this.featchData()
435 } catch (error) {
436 this.$confirm(error, '提示', {
437 confirmButtonText: '确定',
438 type: 'warning'
439 }).then(() => {
440 this.featchData()
441 }).catch(() => {
442 });
443 }
444 },
445 // 数据预览
446 async handleDatapreview (row) {
447 let { result: res, message } = await dataReporting.getQltFwFdcqYzByCondition(row.msgid)
448 if (res != null) {
449 this.diaData = res
450 this.bsmSjsb = row.BSM_SJSB
451 this.$store.dispatch('business/setEdit')
452 this.$refs.editLog.isShow()
453 } else {
454 this.$message(message)
455 }
456 } 206 }
457 } 207 }
458 } 208 }
......