526dd3b0 by 任超

style:上报报文

1 parent 994e0559
1 import filter from '@/utils/filter.js' 1 import filter from '@/utils/filter.js'
2 let vm = null
3 const sendThis = (_this) => {
4 vm = _this
5 }
2 class data extends filter { 6 class data extends filter {
3 constructor() { 7 constructor() {
4 super() 8 super()
5 } 9 }
6 columns () { 10 columns () {
7 return [ 11 return [
12 {
13 label: '序号',
14 type: 'index',
15 width: '50',
16 render: (h, scope) => {
17 return (
18 <div>
19 {(vm.pageData.currentPage - 1) * vm.pageData.pageSize + scope.$index + 1}
20 </div>
21 )
22 }
23 },
24 {
25 label: '汇交状态',
26 render: (h, scope) => {
27 return (
28 <div>
29 <span v-show={scope.row.exchangeState == 0} class='warehousing'>未上报</span>
30 <span v-show={scope.row.exchangeState == 1} class='warehousing'>上报成功未响应</span>
31 <span v-show={scope.row.exchangeState == 2} class='warehousing'>上报失败</span>
32 <span v-show={scope.row.exchangeState == 3} class='adopt'>上报成功响应成功</span>
33 <span v-show={scope.row.exchangeState == 4} class='warehousing'>响应失败</span>
34 </div>
35 )
36 }
37 },
8 { 38 {
9 prop: "areacode", 39 prop: "areacode",
10 label: "行政区代码", 40 label: "行政区代码",
...@@ -39,24 +69,17 @@ class data extends filter { ...@@ -39,24 +69,17 @@ class data extends filter {
39 { 69 {
40 prop: "rectypeName", 70 prop: "rectypeName",
41 label: "业务名称", 71 label: "业务名称",
42 }, 72 },
43 { 73 {
44 prop: "uploadtime", 74 prop: "uploadtime",
45 label: "汇交时间", 75 label: "汇交时间",
46 }, 76 }
47 {
48 label: '汇交状态',
49 render: (h, scope) => {
50 return (
51 <div>
52 {
53 scope.row.exchangeState == '1' ? <span class='adopt'>成功</span> : <span class='warehousing'>失败</span>
54 }
55 </div>
56 )
57 }
58 },
59 ] 77 ]
60 } 78 }
61 } 79 }
62 export default new data() 80 let datas = new data()
81 export {
82 datas,
83 sendThis
84 }
85
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
81 <script> 81 <script>
82 // 上报报文查询 82 // 上报报文查询
83 // 引入表头数据 83 // 引入表头数据
84 import data from "./data"; 84 import { datas, sendThis } from "./data";
85 // 引入表格混入方法 85 // 引入表格混入方法
86 import table from "@/utils/mixin/table"; 86 import table from "@/utils/mixin/table";
87 // 引入详情弹框 87 // 引入详情弹框
...@@ -130,15 +130,7 @@ export default { ...@@ -130,15 +130,7 @@ export default {
130 // table数据 130 // table数据
131 tableData: { 131 tableData: {
132 // 表头数据 132 // 表头数据
133 columns: [ 133 columns: datas.columns()
134 {
135 label: "序号",
136 type: "index",
137 width: "50",
138 index: this.indexMethod,
139 },
140 ]
141 .concat(data.columns())
142 .concat([ 134 .concat([
143 { 135 {
144 label: "操作", 136 label: "操作",
...@@ -185,6 +177,9 @@ export default { ...@@ -185,6 +177,9 @@ export default {
185 title: '' 177 title: ''
186 }; 178 };
187 }, 179 },
180 mounted () {
181 sendThis(this);
182 },
188 methods: { 183 methods: {
189 // 重置表单 184 // 重置表单
190 resetForm () { 185 resetForm () {
......