index.vue
5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<template>
<!-- 监控日志 -->
<div class="jktjDetail from-clues">
<!-- 头部搜索 -->
<div class="from-clues-header">
<el-form ref="form" :model="form" label-width="100px">
<Breadcrumb />
<el-row class="mb-5">
<el-col :span="4">
<el-form-item label="行政区" class="d-flex">
<el-select
v-model="$store.state.user.userInfo.grade === 'county' ? form.qxdm = $store.state.user.userInfo.areaCode : form.qxdm"
class="width100" clearable placeholder="行政区" :disabled="$store.state.user.userInfo.grade === 'county'">
<el-option v-for="item in dicData['A20']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="开始日期" class="d-flex">
<el-date-picker class="width100" :clearable="false" type="date" placeholder="开始日期"
:picker-options="pickerOptionsStart" v-model="form.startDate"
value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="结束日期" class="d-flex">
<el-date-picker class="width100" :clearable="false" type="date" placeholder="结束日期"
:picker-options="pickerOptionsEnd" v-model="form.endDate" value-format="yyyy-MM-dd HH:mm:ss"
@change="endTimeChange"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="2" >
<el-form-item label="实收总金额:" class="d-flex">
<el-input v-model="totalData.SSJE" disabled></el-input>
</el-form-item>
</el-col>
<!-- 操作按钮 -->
<el-col :span="8" class="btnColRight">
<btn nativeType="cz" @click="resetForm">重置</btn>
<btn nativeType="cx" @click="featchData">查询</btn>
</el-col>
</el-row>
</el-form>
</div>
<!-- 图表 -->
<div class="from-clues-content">
<lb-table ref="table" :page-size="pageData.pageSize" :current-page.sync="pageData.current" :total="tableData.total"
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
</lb-table>
</div>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import { getFirstDayOfSeason, timeFormat } from "@/utils/operation";
// 引入表格头部数据
import data from "./data";
// 引入table混入方法
import tableMixin from "@/mixins/tableMixin.js";
import bdcdj from "@/api/bdcdj";
import business from "@/api/business";
export default {
name: "jktj",
mixins: [tableMixin],
data () {
return {
// 分页
pageData: {
total: 0,
pageSize: 10,
current: 1
},
pickerOptionsStart: {
disabledDate: (time) => {
let endDateVal = this.form.endDate;
if (endDateVal) {
return (
time.getTime() >=
new Date(endDateVal).getTime()
);
}
},
},
pickerOptionsEnd: {
disabledDate: (time) => {
let beginDateVal = this.form.startDate;
if (beginDateVal) {
return (
time.getTime() <
new Date(beginDateVal).getTime()
);
}
},
},
// 搜索表单
valueTime: "",
tableData: {
// 表格头部
columns: [
{
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
}
]
.concat(data.columns()),
// 表格列表数据
total: 0,
data: [],
},
// 搜索表单
form: {
startDate: getFirstDayOfSeason(),
endDate: timeFormat(new Date(), true),
qxdm: "",
sfgd: "1"
},
chartData: [],
totalData:{SSJE:0,YSJE:0}
};
},
mounted () {
// 查询业务量
this.featchData();
},
computed: {
...mapGetters(["dicData"]),
},
methods: {
/**
* @description: handleSizeChange
* @param {*} val
* @author:
*/
handleSizeChange (val) {
this.formData.pageSize = val
this.featchData()
},
/**
* @description: 截止日期变化
* @param {*} val
* @author: renchao
*/
endTimeChange (val) {
this.form.endDate = timeFormat(new Date(val), true)
},
/**
* @description: handleSearch
* @author:
*/
handleSearch () {
this.form.currentPage = 1
this.tableData.data = []
if (this.featchData) {
this.featchData()
}
},
/**
* @description: handleCurrentChange
* @param {*} val
* @author:
*/
handleCurrentChange (val) {
this.form.currentPage = val
this.featchData()
},
async featchData() {
let {result: res} = await business.djfcx(this.form);
this.tableData.data = res.list
this.pageData.current = res.pageNum
this.pageData.pageSize = res.pageSize
this.tableData.total = res.total
let {result: dyTotal} = await business.djfTotal(this.form);
this.totalData=dyTotal[0];
}
},
};
</script>
<style scoped lang="scss">
.jktjDetail {
flex-direction: column;
.rows {
margin-left: 100px;
}
.center {
line-height: 50vh;
text-align: center;
color: #b6b5b5;
}
}
</style>