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
<template>
<div class="reportLog from-clues">
<div class="from-clues-header">
<el-form ref="form" :model="form" label-width="80px">
<el-row>
<el-col :span="5">
<el-form-item label="业务号">
<el-input v-model="form.ywh" placeholder="业务号"></el-input>
<el-form ref="form" :model="form" label-width="100px">
<el-row class="marginbtm5">
<el-col :span="6">
<el-form-item label="不动产单元号">
<el-input v-model="form.bdcdyh" class="width100" placeholder="不动产单元号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="接入业务名称" label-width="120px">
<el-select filterable v-model="form.rectype" ref="selectref" @visible-change="isShowSelectOptions"
clearable placeholder="请选择">
<el-option v-for="item in $store.getters.businessInfo" :key="item.jrywbm" :label="item.jrywmc"
:value="item.jrywbm">
</el-option>
</el-select>
<el-col :span="6">
<el-form-item label="开始日期">
<el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
clearable v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="结束日期">
<el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
clearable v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="上报状态">
<el-select v-model="form.status" ref="selectReporting" @visible-change="isShowSelectOptions" clearable
placeholder="上报状态">
<el-col :span="6">
<el-form-item label="业务号">
<el-input v-model="form.ywh" class="width100" placeholder="业务号"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="响应结果">
<el-select v-model="form.status" class="width100" clearable placeholder="响应结果">
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="行政区">
<el-select v-model="form.pcode" clearable placeholder="行政区">
<el-select v-model="form.pcode" class="width100" clearable placeholder="行政区">
<el-option v-for="item in xzqOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="btnColRight">
<el-col :span="12" class="btnColRight">
<el-button type="primary" @click="handleSubmit">查询结果</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<lb-table ref="table" :page-size="pageData.size" :current-page.sync="pageData.current" :total="pageData.total"
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
<lb-table ref="table" :heightNum="300" :page-size="pageData.size" :current-page.sync="pageData.current"
:total="pageData.total" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
:column="tableData.columns" :data="tableData.data">
</lb-table>
</div>
<!-- 相应日志 -->
<response-dialog ref="responseLog" :journalData="journalData" />
<!-- 错误日志 -->
<errorLog-dialog ref="errorLog" :errorData="errorData" />
<!-- 预览 -->
<preview-dialog :content="XMLData" ref="previewLog" />
<!-- 编辑 -->
<edit-dialog ref="editLog" :bsmSjsb="bsmSjsb" :diaData="diaData" />
<!-- 重新发报 -->
<resend-dialog ref="resendLog" :msgid="msgid" />
<!-- 重新转换 -->
<retransfer-dialog ref="retransfer" />
</div>
</template>
......@@ -69,33 +67,42 @@ import data from "./data"
import journal from '@/api/journal.js'
import tableMixin from '@/mixins/tableMixin.js'
import dataReporting from '@/api/dataReporting'
import responseDialog from './components/response-dialog.vue'
import errorLogDialog from './components/errorLog-dialog.vue'
import previewDialog from './components/preview-dialog.vue'
import resendDialog from './components/resend-dialog.vue'
import retransferDialog from './components/retransfer-dialog.vue'
import editDialog from '@/components/dataDetails/edit-dialog.vue'
export default {
name: "reportLog",
mixins: [tableMixin],
components: {
responseDialog,
previewDialog,
resendDialog,
editDialog,
errorLogDialog,
retransferDialog
},
data () {
return {
msgid: '',
// 响应日志
journalData: '',
errorData: '',
XMLData: '',
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return (
time.getTime() >= new Date(this.form.endTime).getTime()
);
}
}
},
// 结束日期限制
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return (
time.getTime() <= new Date(this.form.startTime).getTime()
);
}
}
},
bsmSjsb: '',
diaData: [],
form: {
bdcdyh: '',
startTime: '',
endTime: '',
ywh: '',
rectype: '',
status: '',
pcode: '',
currentPage: 1
......@@ -108,40 +115,7 @@ export default {
index: this.indexMethod,
}].concat(data.columns()).concat([
{
width: 135,
label: "XML报文",
headerAlign: 'center',
align: 'left',
render: (h, scope) => {
return (
<div>
<el-button
type="text"
size="mini"
style="color:#67C23A"
icon="el-icon-view"
v-show={['1', '4', '5', '6', '7', '8'].includes(scope.row.status)}
onClick={() => { this.handlePreview(scope.$index, scope.row) }}
>
预览
</el-button>
<el-button
type="text"
style="margin-bottom:5px"
size="mini"
icon="el-icon-folder"
onClick={() => { this.handleResponseLog(scope.row) }}
v-show={['5', '7'].includes(scope.row.status)}
>
响应日志
</el-button>
</div>
);
},
},
{
label: "操作",
width: 170,
headerAlign: 'center',
align: 'right',
render: (h, scope) => {
......@@ -153,63 +127,13 @@ export default {
icon="el-icon-edit"
style="margin-left: 10px"
onClick={() => { this.handleEdit(scope.$index, scope.row) }}
v-show={scope.row.status == 3}
>
编辑
</el-button>
<el-button
type="text"
size="mini"
style="color:#67C23A"
icon="el-icon-folder-opened"
onClick={() => { this.handleReissue(scope.row) }}
v-show={scope.row.status == 1 || scope.row.status == 5}
>
重新上报
</el-button>
<el-button
type="text"
icon="el-icon-folder-checked"
v-show={scope.row.status == 3 || scope.row.status == 9}
onClick={() => { this.handleInspection(scope.row) }}
>
数据校验
</el-button>
<el-button
v-show={scope.row.status == 2 || scope.row.status == 3}
type="text"
size="mini"
style="margin-left:0;color:#F56C6C"
icon="el-icon-s-order"
onClick={() => { this.handleErrorLog(scope.row) }}
>
错误日志
</el-button>
<el-button
v-show={scope.row.status == 9}
type="text"
size="mini"
icon="el-icon-view"
onClick={() => { this.handleDatapreview(scope.row) }}
>
数据预览
</el-button>
<el-button
v-show={scope.row.status == 2 || scope.row.status == 0}
type="text"
icon="el-icon-copy-document"
size="mini"
onClick={() => { this.handleRetransfer(scope.row) }}
>
重新抽取
</el-button>
</div>
);
},
},
)
}
}
]),
data: []
},
......@@ -218,50 +142,8 @@ export default {
pageSize: 15,
current: 1,
},
diaData: null,
bsmSjsb: '',
// 上报状态
statusOptions: [
{
value: '0',
label: '待抽取'
},
{
value: '2',
label: '内部错误'
},
{
value: '9',
label: '待校验'
},
{
value: '3',
label: '本地校验失败'
},
{
value: '1',
label: '待上报'
},
{
value: '4',
label: '上报成功等待响应'
},
{
value: '5',
label: '上报时发生错误'
},
{
value: '6',
label: '本地上报成功,查询上报结果错误'
},
{
value: '7',
label: '本地上报成功,上级也上报成功'
},
{
value: '8',
label: '本地上报成功,上级上报失败'
}
],
// 行政区
xzqOptions: [
......@@ -284,22 +166,7 @@ export default {
]
}
},
watch: {
'tableData.data' (val) {
this.doLayout();
}
},
methods: {
doLayout () {
this.$nextTick(() => {
this.$refs.table.doLayout()
})
},
// 是否显示下拉框
isShowSelectOptions (e) {
if (!e) this.$refs.selectref.blur()
if (!e) this.$refs.selectReporting.blur()
},
async featchData () {
try {
this.form = Object.assign(this.form, this.formData)
......@@ -319,38 +186,6 @@ export default {
this.message = error
}
},
async handleResponseLog (row) {
try {
let { result: res } = await journal.queryResponseLog(row.msgid)
if (res != null) {
this.$refs.responseLog.$refs.response.isShow()
this.journalData = res
} else {
this.$message('响应日志为空')
}
} catch (error) {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
}
},
async handlePreview (index, row) {
try {
let res = await journal.queryXML(row.msgid)
if (res != null) {
this.XMLData = res.result
this.$refs.previewLog.$refs.preview.isShow()
} else {
this.$message('报文为空')
}
} catch (error) {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
}
},
async handleEdit (index, row) {
try {
let { result: res, message } = await dataReporting.getQltFwFdcqYzByCondition(row.msgid)
......@@ -362,97 +197,12 @@ export default {
} else {
this.$message(message)
}
} catch (error) {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
}
},
handleReissue (row) {
this.msgid = row.msgid
this.$refs.resendLog.$refs.resend.isShow()
},
// 错误日志
async handleErrorLog (row) {
try {
let res = await journal.queryErrorLog(row.msgid)
this.errorData = res.message
this.$refs.errorLog.$refs.error.isShow()
} catch (error) {
this.$alert(error, '提示', {
confirmButtonText: '确定',
type: 'error'
})
}
},
// 重新抽取
handleRetransfer (row) {
let _this = this
this.$confirm('此操作将重新抽取该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.extractLoading = true
try {
let res = await journal.extractionAndInsertData(row.msgid)
if (res.code == 200) {
_this.$message({
message: res.result,
type: 'success'
});
_this.featchData()
}
} catch (error) {
_this.$confirm(error, '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
_this.featchData()
})
}
this.extractLoading = false
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
},
// 检验报文
async handleInspection (row) {
try {
let res = await journal.checkSjsbXmlDatas(row.msgid)
if (res.code == 200) {
this.$message({
message: '校验成功',
type: 'success'
});
}
this.featchData()
} catch (error) {
this.$confirm(error, '提示', {
confirmButtonText: '确定',
type: 'warning'
}).then(() => {
this.featchData()
}).catch(() => {
});
}
},
// 数据预览
async handleDatapreview (row) {
let { result: res, message } = await dataReporting.getQltFwFdcqYzByCondition(row.msgid)
if (res != null) {
this.diaData = res
this.bsmSjsb = row.BSM_SJSB
this.$store.dispatch('business/setEdit')
this.$refs.editLog.isShow()
} else {
this.$message(message)
}
}
}
}
......