9cdd6ef4 by 任超

feat:中心日志

1 parent 3d8df037
1 import { mapGetters } from 'vuex' 1 import { mapGetters } from 'vuex'
2 import business from '@/api/business'
3 let mixin = { 2 let mixin = {
4 data () { 3 data () {
5 return { 4 return {
...@@ -13,33 +12,8 @@ let mixin = { ...@@ -13,33 +12,8 @@ let mixin = {
13 }, 12 },
14 created () { 13 created () {
15 this.featchData() 14 this.featchData()
16 this.keyupSubmit()
17 }, 15 },
18 methods: { 16 methods: {
19 async handleXmlres (index, row) {
20 try {
21 let { result: res } = await business.queryXML(row.BSM_SJSB)
22 if (res != null) {
23 this.xml = res
24 this.$refs.dialog.$refs.xmlDialog.isShow();
25 } else {
26 this.$message('报文为空')
27 }
28 } catch (error) {
29 this.$alert(error, '提示', {
30 confirmButtonText: '确定',
31 type: 'error'
32 })
33 }
34 },
35 keyupSubmit () {
36 document.onkeydown = e => {
37 let _key = window.event.keyCode;
38 if (_key === 13) {
39 this.featchData()
40 }
41 }
42 },
43 // 表格索引得问题 17 // 表格索引得问题
44 indexMethod (index) { 18 indexMethod (index) {
45 return index + 1 + (this.form.currentPage - 1) * this.formData.pageSize; 19 return index + 1 + (this.form.currentPage - 1) * this.formData.pageSize;
......
...@@ -150,6 +150,19 @@ export const asyncRoutes = [ ...@@ -150,6 +150,19 @@ export const asyncRoutes = [
150 } 150 }
151 ] 151 ]
152 }, 152 },
153 // 中心日志
154 {
155 path: '/zxrz',
156 component: Layout,
157 children: [
158 {
159 path: 'index',
160 component: () => import('@/views/zxrz/index'),
161 name: 'zxrz',
162 meta: { title: '中心日志', icon: 'zhcx' }
163 }
164 ]
165 },
153 // 接入业务信息 166 // 接入业务信息
154 { 167 {
155 path: '/busineInfo', 168 path: '/busineInfo',
......
1 import filter from '@/utils/filter.js'
2 class data extends filter {
3 constructor() {
4 super()
5 }
6 columns () {
7 return [
8 {
9 prop: "name",
10 label: "用户名称",
11 },
12 {
13 prop: "sj",
14 label: "时间",
15 },
16 {
17 prop: "czlx",
18 label: "操作类型",
19 },
20 {
21 prop: "ywh",
22 label: "业务号",
23 }
24 ]
25 }
26 }
27 export default new data()
File mode changed
1 <template>
2 <div class="from-clues">
3 <div class="from-clues-header">
4 <el-form ref="ruleForm" :model="form" label-width="80px">
5 <el-row>
6 <el-col :span="5">
7 <el-form-item label="用户名称" prop="name">
8 <el-input v-model="form.name" class="width100" placeholder="用户名称"></el-input>
9 </el-form-item>
10 </el-col>
11 <el-col :span="5">
12 <el-form-item label="开始日期" prop="startTime">
13 <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
14 clearable v-model="form.startTime" value-format="yyyy-MM-dd"></el-date-picker>
15 </el-form-item>
16 </el-col>
17 <el-col :span="5">
18 <el-form-item label="结束日期" prop="endTime">
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>
21 </el-form-item>
22 </el-col>
23 <el-col :span="5">
24 <el-form-item label="操作类型" prop="czlx">
25 <el-select v-model="form.czlx" class="width100" clearable placeholder="操作类型">
26 <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
27 </el-option>
28 </el-select>
29 </el-form-item>
30 </el-col>
31 <el-col :span="4" class="btnColRight">
32 <el-button @click="resetForm('ruleForm')">重置</el-button>
33 <el-button type="primary" @click="handleSubmit">查询结果</el-button>
34 </el-col>
35 </el-row>
36 </el-form>
37 </div>
38 <div class="from-clues-content">
39 <lb-table ref="table" :page-size="pageData.size" :current-page.sync="pageData.current" :total="pageData.total"
40 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
41 :data="tableData.data">
42 </lb-table>
43 </div>
44 </div>
45 </template>
46 <script>
47 import data from "./data"
48 import tableMixin from '@/mixins/tableMixin.js'
49 export default {
50 name: "reportLog",
51 mixins: [tableMixin],
52 data () {
53 return {
54 // 开始结束日期限制
55 pickerOptionsStart: {
56 disabledDate: (time) => {
57 if (this.form.endTime) {
58 return (
59 time.getTime() >= new Date(this.form.endTime).getTime()
60 );
61 }
62 }
63 },
64 // 结束日期限制
65 pickerOptionsEnd: {
66 disabledDate: (time) => {
67 if (this.form.startTime) {
68 return (
69 time.getTime() <= new Date(this.form.startTime).getTime()
70 );
71 }
72 }
73 },
74 bsmSjsb: '',
75 diaData: [],
76 form: {
77 name: '',
78 startTime: '',
79 endTime: '',
80 ywmc: '',
81 czlx: '',
82 currentPage: 1
83 },
84 rules: {
85 name: [
86 { required: true, message: '用户名称', trigger: 'change' }
87 ],
88 startTime: [
89 { required: true, message: '开始日期', trigger: 'change' }
90 ],
91 endTime: [
92 { required: true, message: '结束日期', trigger: 'change' }
93 ],
94 czlx: [
95 { required: true, message: '操作类型', trigger: 'change' }
96 ]
97 },
98 tableData: {
99 columns: [{
100 label: '序号',
101 type: 'index',
102 width: '50',
103 index: this.indexMethod,
104 }].concat(data.columns()).concat([
105 {
106 label: "操作",
107 width: '80',
108 render: (h, scope) => {
109 return (
110 <div>
111 <el-button
112 type="text"
113 size="mini"
114 icon="el-icon-edit"
115 style="margin-left: 10px"
116 onClick={() => { this.handleDetails(scope.row) }}
117 >
118 详情
119 </el-button>
120 </div>
121 )
122 }
123 }
124 ]),
125 data: []
126 },
127 pageData: {
128 total: 0,
129 pageSize: 15,
130 current: 1,
131 }
132 }
133 },
134 methods: {
135 resetForm () {
136 this.$refs.ruleForm.resetFields();
137 },
138 async featchData () {
139 },
140 handleDetails (row) {
141 }
142 }
143 }
144 </script>
145 <style scoped lang="scss">
146 @import "~@/styles/public.scss";
147 @import "./index.scss";
148 </style>
149