summary.vue
3.87 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
<template>
<div class="system-container">
<div class="container">
<h1>试乘试驶汇总统计</h1>
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="small">
<el-form-item label="关键字:">
<el-input v-model="searchForm.dddd" placeholder="特约店编码|店名称"></el-input>
</el-form-item>
<el-form-item label="车辆归属:">
<el-popover v-model="filterVisible" placement="bottom-start" width="400" trigger="click">
<div>
<glsx-organization @change="onChange"></glsx-organization>
</div>
<el-input v-model="searchForm.orgName" :placeholder="searchForm.specialShopName || '所属组织'" slot="reference" readonly clearable>
</el-input>
</el-popover>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button type="default" icon="el-icon-refresh" @click="rest()">重置</el-button>
</el-form-item>
</el-form>
</div>
<!-- 搜索区域 end -->
<!-- 按钮区域 开始 -->
<div class="links_group">
<span>试乘试驾汇总信息</span>
<el-button class="pull-right" type="primary" icon="el-icon-download" size="small" @click="btnClick('export')">导出Excel</el-button>
</div>
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table :list="tableData" :column="columnList" :pageTotal="pageTotal" @change="getTableList">
</glsx-table>
<!-- 列表 end -->
</div>
</div>
</template>
<script>
import GlsxTable from "@/components/glsx-table";
import { getList } from "services/report";
import GlsxOrganization from "@/components/glsx-organization";
export default {
components: {
GlsxTable,
GlsxOrganization,
},
data() {
return {
searchForm: {},
test: "1",
tableData: [],
columnList: [
{ label: "所属大区", prop: "sn", align: "center" },
{ label: "所属省", prop: "shopName" },
{ label: "所属市", prop: "sn" },
{ label: "特约店名称", prop: "" },
{ label: "特约店编码", prop: "" },
{ label: "店级别", prop: "" },
{ label: "线路数量", prop: "" },
{ label: "店围栏", prop: "" },
{ label: "所属车辆数", prop: "" },
{ label: "是否关联", prop: "" },
],
pageTotal: 0,
filterVisible:false
};
},
mounted() {
this.getTableList();
},
methods: {
// 重置
rest(){
this.searchForm = {}
this.getTableList()
},
// 获取列表
getTableList(options) {
let oParams = {};
oParams.pageSize = options ? options.pageSize || 10 : 10;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
getList(oParams).then((res) => {
let { data } = res;
let { list, totalElements } = data;
this.pageTotal = totalElements;
this.tableData = list;
});
},
// 查看详情
lookDetail(row) {
console.log(row);
// let query = {}
// let path = '/oEshield#/reportManage/mileageDetail';
// history.pushState(query, path, path);
this.$router.push({ name: "mileageDetail" });
},
// 监听树
onChange(e) {
this.filterVisible = false;
console.log(e);
if (e) {
this.orgInfo = e.origin;
this.searchForm.orgId = e.origin.orgId;
this.searchForm.orgType = e.origin.type;
this.searchForm.orgName = e.origin.orgName;
}
},
},
};
</script>
<style lang="scss" scoped>
.pre_select {
width: 100px;
}
.title_tips {
font-size: 14px;
}
.links_group {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>>