overviewlist.vue
11.5 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="部门">
<a-select style="width: 100%" placeholder="请选择" v-model="queryParam.select">
<a-select-option v-for="(role,roleindex) in dataSource" :key="role.campId"
:value="role.campId">
{{ role.days }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="餐点">
<a-select style="width: 100%" placeholder="请选择" v-model="queryParam.select">
<a-select-option v-for="(role,roleindex) in dataSource" :key="role.campId"
:value="role.campId">
{{ role.days }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用餐时段">
<a-select style="width: 100%" placeholder="请选择" v-model="queryParam.select">
<a-select-option v-for="(role,roleindex) in dataSource" :key="role.campId"
:value="role.campId">
{{ role.days }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="售饭机">
<a-select style="width: 100%" placeholder="请选择" v-model="queryParam.select">
<a-select-option v-for="(role,roleindex) in dataSource" :key="role.campId"
:value="role.campId">
{{ role.days }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="7" :md="8" :sm="24">
<a-form-item label="日期">
<a-date-picker v-model="queryParam.entryTime" :disabled-date="disabledStartDate"
show-time format="YYYY-MM-DD HH:mm:ss" placeholder="Start"
@openChange="handleStartOpenChange" />
至
<a-date-picker v-model="queryParam.qurtTime" :disabled-date="disabledEndDate" show-time
format="YYYY-MM-DD HH:mm:ss" placeholder="End" :open="endOpen"
@openChange="handleEndOpenChange" />
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置
</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('Biao')"
style="margin-left: 8px">导出</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 图表显示区域 -->
<div style="margin:25px" id="myChart" :style="{width: '100%', height: '400px'}"></div>
<!-- table区域-begin -->
<div>
<a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
:pagination="ipagination" :loading="loading" class="j-table-force-nowrap">
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
// import VeriDetailModal from './modules/VeriDetailModal'
import { httpAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
name: "VeriDetailList",
mixins: [JeecgListMixin],
components: {
// VeriDetailModal
},
data() {
return {
description: 'Biao管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '日期',
align: "center",
dataIndex: 'days'
},
{
title: '线上销售笔数',
align: "center",
dataIndex: 'mealType'
},
{
title: '销售额(元)',
align: "center",
dataIndex: 'adultType'
},
{
title: '补贴消费(元)',
align: "center",
dataIndex: 'price'
},
{
title: '充值消费(元)',
align: "center",
dataIndex: 'useCon'
},
{
title: '线下销售笔数',
align: "center",
dataIndex: 'useSun'
},
{
title: '销售额总额(元)',
align: "center",
dataIndex: 'useStored'
},
{
title: '补贴消费(元)',
align: "center",
dataIndex: 'useWechart'
},
{
title: '补贴消费(元)',
align: "center",
dataIndex: 'isVeri'
},
],
url: {
list: "/veri/veriDetail/list",
delete: "/veri/veriDetail/delete",
deleteBatch: "/veri/veriDetail/deleteBatch",
exportXlsUrl: "veri/veriDetail/exportXls",
importExcelUrl: "veri/veriDetail/importExcel",
},
endOpen: false,
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
mounted() {
this.drawLine();
},
methods: {
disabledStartDate(startValue) {
const endValue = this.queryParam.qurtTime;
if (!startValue || !endValue) {
return false;
}
return startValue.valueOf() > endValue.valueOf();
},
disabledEndDate(endValue) {
const startValue = this.queryParam.entryTime;
if (!endValue || !startValue) {
return false;
}
return startValue.valueOf() >= endValue.valueOf();
},
handleStartOpenChange(open) {
if (!open) {
this.endOpen = true;
}
},
handleEndOpenChange(open) {
this.endOpen = open;
},
drawLine() {
// this.load_data = true;
// 基于准备好的dom,初始化echarts实例
var echarts = require('echarts');
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('myChart'));
var httpurl = this.url.delete
var method = 'get'
httpAction(httpurl, this.queryParam, method).then((res) => {
for (var i = 0; i < this.tableData.length; i++) {
xAxisdata.push(this.tableData[i].nowDate);
income.push(this.tableData[i].income);
}
// 绘制图表s
// myChart.setOption({
// title: {
// text: ""
// },
// tooltip: {},
// xAxis: {
// data: xAxisdata
// },
// : {
// // orient 设置布局方式,默认水平布局,可选值:'horizontal'(水平) ¦ 'vertical'(垂直)
// orient: 'vertical',
// // x 设置水平安放位置,默认全图居中,可选值:'center' ¦ 'left' ¦ 'right' ¦ {number}(x坐标,单位px)
// x: 'left',
// // y 设置垂直安放位置,默认全图顶端,可选值:'top' ¦ 'bottom' ¦ 'center' ¦ {number}(y坐标,单位px)
// y: 'top',
// data: ['微信收入', '微信支出', '微信利润'],
// textStyle: {
// fontSize: 14
// },
// },
// yAxis: {
// // data: [500, 1000, 1500, 2000, 2500, 3000]
// },
// series: [{
// name: "微信收入",
// type: "line",
// label: {
// normal: {
// show: true,
// position: "top"
// }
// },
// data: income
// }]
// });
});
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>