14e5aa23 by 任超

style:登薄日志查询

1 parent 80e9eda8
......@@ -75,14 +75,14 @@ export const asyncRoutes = [
},
// 登簿日志
{
path: '/registerLog',
path: '/dbrzcx',
component: Layout,
children: [
{
path: 'index',
component: () => import('@/views/registerLog/index'),
name: 'registerLog',
meta: { title: '登簿日志', icon: 'zhcx' }
component: () => import('@/views/dbrzcx/index'),
name: 'dbrzcx',
meta: { title: '登簿日志查询', icon: 'zhcx' }
}
]
},
......
......@@ -2,30 +2,16 @@ class data {
columns () {
return [
{
prop: "areaname",
label: "行政区名称",
width: 100
prop: "qumc",
label: "区域名称",
},
{
prop: "areacode",
label: "行政区代码",
width: 100
prop: "date",
label: "日期",
},
{
prop: "accessdate",
width: 135,
label: "上报日期"
},
{
label: "类别",
render: (h, scope) => {
return (
<div>
<p>登簿</p>
<p>接入</p>
</div>
)
},
prop: "type",
label: "类型"
},
{
label: "总量",
......@@ -39,6 +25,10 @@ class data {
},
},
{
prop: "ywlxsl",
label: "业务类型数量"
},
{
label: "首次登记",
render: (h, scope) => {
return (
......
<template>
<div class="registerLog from-clues">
<div class="registerLog-header from-clues-header">
<!-- 登簿日志查询 -->
<div class="from-clues">
<!-- 头部搜索 -->
<div class="from-clues-header">
<el-form ref="ruleForm" :model="form" label-width="80px">
<el-row>
<el-col :span="6">
<el-form-item label="行政区">
<el-form-item label="行政区" label-width="60px">
<el-select v-model="form.pcode" class="width100" filterable placeholder="请选择行政区">
<el-option v-for="item in []" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
......@@ -23,6 +25,7 @@
clearable v-model="form.endTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col :span="6" class="btnColRight">
<el-button @click="resetForm('ruleForm')">重置</el-button>
<el-button type="primary" @click="handleSubmit">查询结果</el-button>
......@@ -30,33 +33,26 @@
</el-row>
</el-form>
</div>
<!-- 列表区域 -->
<div class="from-clues-content">
<lb-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>
</div>
<!-- 预览弹框 -->
<dialogBox ref="dialog" isReset saveButton="关闭" divider title="XML报文">
<div class="xmlMessage">
{{ xml }}
</div>
</dialogBox>
</div>
</template>
<script>
// 登簿日志
// 登簿日志查询
// 引入列表数据
import data from "./data"
import journal from '@/api/journal.js'
import fromMixin from '@/mixins/fromMixin.js'
// 引入表格混入方法
import tableMixin from '@/mixins/tableMixin.js'
export default {
name: "registerLog",
mixins: [fromMixin, tableMixin],
name: "dbrzcx",
mixins: [tableMixin],
data () {
return {
xml: '',
// 开始结束日期限制
pickerOptionsStart: {
disabledDate: (time) => {
......@@ -77,40 +73,26 @@ export default {
}
}
},
// 表单
form: {
pcode: '',
startTime: '',
endTime: '',
currentPage: 1
},
// table数据
tableData: {
// 表头
columns: [{
label: '序号',
type: 'index',
width: '50',
index: this.indexMethod,
}].concat(data.columns())
.concat([
{
label: "XML报文",
width: 130,
render: (h, scope) => {
return (
<div>
<el-button
type="text"
icon="el-icon-view"
onClick={() => { this.handlePreview(scope.$index, scope.row) }}
>
预览
</el-button>
</div>
);
},
},
]),
}].concat(data.columns()),
// 列表
data: []
},
// 分页
pageData: {
total: 0,
pageSize: 15
......@@ -118,26 +100,11 @@ export default {
}
},
methods: {
// 重置表单
resetForm () {
this.$refs.ruleForm.resetFields();
},
async featchData () {
try {
this.form = Object.assign(this.form, this.formData)
let { list, total, pages: pageSize, pageNum: current
} = await journal.queryAccessLogs(this.form)
this.tableData.data = list
this.pageData = {
pageSize,
current,
total
}
} catch (error) {
this.message = error
}
},
async handlePreview (index, row) {
}
}
}
......