Commit eac5e25d by jack

1.3.0

1 parent 914267b5
This diff could not be displayed because it is too large.
......@@ -63,7 +63,7 @@
></el-tag>
</template>
<template v-else-if="item.formatter">
<span v-text="item.formatter(scope.row)"></span>
<span v-html="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span v-text="data[scope.$index][item.prop]"></span>
......
<template>
<div class="">
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small">
</el-input>
<el-tree style="max-height:50vh;overflow:auto" class="filter-tree" :data="filterTextData" :filter-node-method="filterNode" highlight-current ref="tree" node-key="id" check-on-click-node>
</el-tree>
<p style="text-align: right; margin-top: 10px">
<el-button @click="filterConfirm" type="primary">确定</el-button>
<el-button @click="closeFilter">取消</el-button>
</p>
</div>
</template>
<script>
import { getOrgTree } from "services/common";
import { showToast } from "@/utils/util";
export default {
name: "GlsxOrganization",
data() {
return {
filterText: "",
filterTextData: [],
};
},
mounted() {
this.getTree();
},
methods: {
// 确认选择树
filterConfirm() {
let o = this.$refs.tree.getCurrentNode();
if (!o) {
showToast({
message: "请选择所属组织",
type: "error",
});
return false;
}
const { label, id, origin } = o;
if (origin && origin.type != "u") {
showToast({
message: "请选择下级所属组织",
type: "error",
});
return false;
}
console.log(o);
this.$emit("change", o);
// this.searchForm.specialShopName = label.split("/")[1];
// this.searchForm.specialShopCode = label.split("/")[0];
//this.$set(this, "form.specialShopName", label);
//this.searchForm.specialShopId = id;
//this.closeFilter();
},
// 获取组织机构树数据
getTree() {
getOrgTree({ hasUserLeaf: true }).then((res) => {
const { data } = res;
this.filterTextData = data || [];
});
},
// 搜索树
filterNode(value, data) {
console.log(value, data);
this.loading = false;
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
// 关闭树
closeFilter() {
this.$emit("change");
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="glsx_table_box">
<el-table class="el_table" :data="list" border :size="size">
<el-table-column v-for="(item,index) in column" :key="index" :label="item.label" :prop="item.prop" :formatter="item.formatter" :align="item.align" :fixed="item.fixed" :width="item.width" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" v-if="this.$scopedSlots.operate" width="120px">
<template slot-scope="scope">
<slot name="operate" :scope="scope.row"></slot>
</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" hide-on-single-page :total="pageTotal" :page-size="pageSize" :page-sizes="pageSizes" :current-page.sync="currentPage" @current-change="getList" @size-change="changePageSize" />
</div>
</div>
</template>
<script>
/**
* list: 表格数据
* border:是否带边框
* size:表格尺寸
* column: 列数据
* layout:分页展示数据
* pageSizes: 默认展示多少页列表
* pageSize: 当前展示页条数
*/
export default {
name: "GlsxTable",
props: {
list: {
type: Array,
default: function () {
return [];
},
},
column: {
type: Array,
default: function () {
return [];
},
},
border: {
type: Boolean,
default: true,
},
size: {
type: String,
default: "small",
},
layout: {
type: String,
default: "sizes, total,prev, pager, next, jumper",
},
pageTotal: {
type: Number,
default: 0,
},
pageSizes: {
type: Array,
default: function () {
return [10, 20, 30, 40];
},
},
pageSize: {
type: Number,
default: 10,
},
},
data() {
return {
currentPage:1
};
},
created() {
//console.log(this.$scopedSlots);
},
mounted() {
console.log(this.$scopedSlots);
},
methods: {
/**
* 每页展示
*/
changePageSize: function (e) {
this.pageSize = e;
this.$emit("change",{pageSize:e});
//this.getList();
},
// 获取列表
getList(current) {
this.$emit("change",{pageNumber:current});
},
// 重置
rest(){
this.currentPage = 1;
}
},
};
</script>
<style lang="scss">
.el_table {
thead {
th {
//background: rgba(197, 197, 197, 0.1);
background: #f5f7fa;
}
}
}
</style>
<style lang="scss" scoped>
.glsx_table_box {
margin: 10px 0;
}
.pagination_list {
text-align: right;
padding: 10px 0;
}
</style>
\ No newline at end of file
......@@ -97,6 +97,51 @@ const routes = [
}
},
{
path: '/reportManage/mileage',
name: 'mileage',
component: () => import('../views/reportManage/mileage.vue'),
meta: {
title: '里程统计',
keepAlive: true
}
},
{
path: '/reportManage/mileageDetail',
name: 'mileageDetail',
component: () => import('../views/reportManage/mileageDetail.vue'),
meta: {
title: '里程详情',
keepAlive: true
}
},
{
path: '/reportManage/oil',
name: 'oil',
component: () => import('../views/reportManage/oil.vue'),
meta: {
title: '油耗统计',
keepAlive: true
}
},
{
path: '/reportManage/driverDetail',
name: 'driverDetail',
component: () => import('../views/reportManage/driverDetail.vue'),
meta: {
title: '试驾详情',
keepAlive: true
}
},
// {
// path: '/reportManage/summary',
// name: 'summary',
// component: () => import('../views/reportManage/summary.vue'),
// meta: {
// title: '汇总统计',
// keepAlive: true
// }
// },
{
path: '/specialShop',
name: 'specialShop',
component: () => import('../views/specialShop/index.vue'),
......
......@@ -17,4 +17,49 @@ function getOutStoreList (params) {
return request(params, '/trialdrive/notinstorereport/search')
}
// 报表管理-里程统计
export const GETMILEAGESTATISTICS = params => {
return request(params, '/trialdrive/mileagestatistics/search')
}
// 报表管理-里程统计-导出excel
export const MILEAGESTATISTICSEXPORT = '/trialdrive/mileagestatistics/export'
// 报表管理-里程统计-日里程-导出excel
export const MILEAGEEXPORTDAILYDETAILS = '/trialdrive/mileagestatistics/exportdailydetails'
// 报表管理-油耗统计-查询列表
export const OIL_STATISTICS_SEARCH = params => {
return request(params, '/trialdrive/oilstatistics/search')
}
// 报表管理-油耗统计-获取有数据的年份
export const OIL_YEARS_LIST = params => {
return request(params, '/trialdrive/oilstatistics/years')
}
// 报表管理-油耗统计-导出excel
export const OIL_STATISTICS_EXPORT = '/trialdrive/oilstatistics/export'
// 报表管理-驾驶详情-获取列表
export const DRIVE_DETAIL_SEARCH = params => {
return request(params, '/trialdrive/trialdrivereport/detailsearch')
}
// 报表管理-驾驶详情-导出excel
export const DRIVE_STATISTICS_EXPORT = '/trialdrive/trialdrivereport/detailExport'
// 报表管理-里程统计-里程详情-根据车架号获取绑定过的设备
export const MILEAGE_GETSN = params => {
return request(params, '/trialdrive/mileagestatistics/getsnbyvin')
}
// 报表管理-里程统计-里程详情-获取列表
export const MILEAGE_GETDAILYSEARCH = params => {
return request(params, '/trialdrive/mileagestatistics/dailysearch')
}
// 报表管理-里程统计-里程详情-导出excel
export const MILEAGE_STATISTICS_EXPORT = '/trialdrive/mileagestatistics/dailyexport'
export { getList, getYears, getOutStoreList }
......@@ -46,8 +46,8 @@ export const Common = {
(options.success)()
}
}).catch((error) => {
if (options.errorFunc) {
(options.errorFunc)(error)
if (options.fail) {
(options.fail)(error)
}
})
},
......
import Vue from 'vue'
import { Message, MessageBox, Loading } from 'element-ui'
import moment from 'moment'
let loadingInstance = ''
export const Util = {
/**
* 简单alert
* title 标题
* message 内容
* className 自定义class
* showCancelButton 是否展示取消按钮
* confirmButtonText 确认按钮文案
* cancelButtonText 取消按钮文案
* confirmButtonColor 确认按钮颜色
* cancelButtonColor 取消按钮颜色
* type: success / info / warning / error
*/
msg: function (options) {
MessageBox({
title: options.title || '',
type: options.type || 'error',
message: options.message || '',
className: options.className || '',
showCancelButton: options.showCancelButton || false,
confirmButtonText: options.confirmButtonText || '确认',
cancelButtonText: options.cancelButtonText || '取消',
confirmButtonColor: options.confirmButtonColor || '#1989fa',
cancelButtonColor: options.cancelButtonColor || '#000',
dangerouslyUseHTMLString: true,
center: options.center || false,
callback: function (action, done) {
if (action == 'confirm') {
if (options.success) {
options.success(done)
}
} else {
console.log(done)
//done.close()
}
},
})
/* Vue.$vux.alert.show({
title: options.title||'',
content: options.message||'',
onShow() {
options.onShow?(options.onShow)():'';
},
onHide() {
options.onHide?(options.onHide)():'';
}
}) */
},
/**
* 提示框
*/
Info: function (options) {
Message({
message: options.message || '提示',
type: options.type || 'error',
duration: options.time || 2000,
onClose: options.onClose || '',
})
},
/**
* 轻提示
*/
Tips: function (options) {
Message({
message: options.message || '提示',
duration: options.duration || 3000,
type: options.type || 'text',
icon: options.icon || '',
})
},
/**
* loading
*/
loading: function (message) {
loadingInstance = Loading.service({
text: message || '加载中...',
})
},
/**
* 关闭loading
*/
closeLoading: function () {
loadingInstance.close()
},
/**
* 校验手机号码格式
*/
checkPhone: function (mobile) {
let myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
},
/**
* 校验固定电话
*/
validationTel: function (tel) {
let reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel)
},
/**
* 是否特殊字符
*/
isSpecialLetter: function (str) {
let reg = new RegExp(
"[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"
)
return reg.test(str)
},
/**
* 获取当前时间
*/
getCurrentDate: function () {
let time = new Date()
let y = time.getFullYear()
let m = time.getMonth() + 1
let d = time.getDate()
return {
date: y + '/' + m + '/' + d,
}
},
/**
* 获取浏览器参数
*/
getUrlParams: function (name) {
let vars = [],
hash
let oParams = {}
let hashes = window.location.href
.slice(window.location.href.indexOf('?') + 1)
.split('&')
for (let i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=')
vars.push(hash[0])
oParams[hash[0]] = hash[1]
}
console.log(vars)
if (name) {
return oParams[name]
} else {
return oParams
}
},
/**
* 根据当前时间,计算往后30天的日期
*/
getAfterDate: function (day) {
let date1 = new Date()
let date2 = new Date(date1)
let time = 30
if (day) {
time = day
}
date2.setDate(date1.getDate() + time)
let _date =
date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate()
return {
date: _date,
year: date2.getFullYear(),
month: date2.getMonth() + 1,
day: date2.getDate(),
}
},
/**
* 日期格式转换
*/
dateFormate: function (str, type) {
let txt = 'YYYY-MM-DD'
if (!str) {
return ''
}
if (type) {
txt = type
}
const m = moment(str).format(txt)
return m
},
/**
* 字段截取
*/
cutStr: function (str, num) {
if (!str) {
return ''
}
let m = 10
let n = str
if (num) {
m = num
}
if (str.length > m) {
n = str.slice(0, m) + '...'
}
return n
},
/**
* 深克隆 所有原型链上的对象和属性
* 例: const bar=deepClone(foo)
* console.log(bar===foo) false
* @param {*} obj
*/
deepClone: function (obj) {
// Handle the 3 simple types, and null or undefined or function
if (obj == null || typeof obj !== 'object') return obj
// Handle Date
if (obj instanceof Date) {
const copy = new Date()
copy.setTime(obj.getTime())
return copy
}
// Handle Array or Object
if ((obj instanceof Array) | (obj instanceof Object)) {
const copy = obj instanceof Array ? [] : {}
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) {
copy[attr] = Util.deepClone(obj[attr])
}
}
return copy
}
throw new Error("Unable to clone obj! Its type isn't supported.")
},
}
export const showModal = Util.msg
export const showToast = Util.Info
export const showLoading = Util.loading
export const hideLoading = Util.closeLoading
export const deepClone = Util.deepClone
<template>
<div class="system-container">
<div class="container">
<h1>试驶详情汇总</h1>
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="medium">
<el-form-item label="关键字:">
<el-input v-model="searchForm.keywords" placeholder="特约店编码|店名称|车架号|车型"></el-input>
</el-form-item>
<el-form-item label="试驾是/否有效:">
<el-select v-model="searchForm.validDriveType" placeholder="请选择">
<!-- <el-option label="全部" value=""></el-option> -->
<el-option label="有效" value="1"></el-option>
<el-option label="无效" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="日期:">
<el-date-picker v-model="timeDate" type="daterange" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getList()">搜索</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="medium" :loading="dloading" @click="downloadExcel()">导出Excel</el-button>
</div>
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table ref="glsxTable" :list="tableData" :column="columnList" :pageTotal="pageTotal" @change="getList">
<div slot="operate" slot-scope="{scope}">
<!-- <el-button size="mini" :id="scope.id">试驾轨迹</el-button> -->
<el-link type="primary" :unline="false" :id="scope.id" @click="lookTrack(scope)">试驾轨迹</el-link>
</div>
</glsx-table>
<!-- 列表 end -->
</div>
</div>
</template>
<script>
import GlsxTable from "@/components/glsx-table";
import { DRIVE_DETAIL_SEARCH, DRIVE_STATISTICS_EXPORT } from "services/report";
import moment from "moment";
import { deepClone } from "@/utils/util";
export default {
data() {
return {
searchForm: {keywords:this.$route.query.vin},
test: "1",
tableData: [],
columnList: [
{ label: "特约店编码", prop: "account", align: "center" },
{ label: "特约店名称", prop: "username" },
{ label: "车牌号", prop: "licensePlate" },
{ label: "车架号", prop: "vin" },
{ label: "设备号", prop: "sn" },
{ label: "车型", prop: "typeName" },
{ label: "开始时间", prop: "journeyBeginTime" },
{ label: "结束时间", prop: "journeyEndTime" },
{ label: "是否有效", prop: "valid" },
{ label: "无效原因", prop: "reason" },
],
pageTotal: 0,
pickerOptions: {
shortcuts: [
{
text: "昨日",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
picker.$emit("pick", [start, end]);
},
},
{
text: "本周",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment().weekday(1).format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "上周",
onClick(picker) {
let weekOfDay = parseInt(moment().format("E"));
const end = moment()
.subtract(weekOfDay, "days")
.format("YYYY-MM-DD");
const start = moment()
.subtract(weekOfDay + 7 - 1, "days")
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "本月",
onClick(picker) {
const start = moment().add("month", 0).format("YYYY-MM") + "-01";
const end = moment().format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "上月",
onClick(picker) {
const end = moment()
.month(moment().month() - 1)
.endOf("month")
.format("YYYY-MM-DD");
const start = moment()
.month(moment().month() - 1)
.startOf("month")
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
],
},
dloading: false,
timeDate: [],
};
},
components: {
GlsxTable,
},
created(){
let o = this.$route.query;
this.timeDate = o.day?[o.day,o.day]:[]
},
mounted() {
this.getList();
},
methods: {
// 获取查询参数
getParams() {
let oParams = deepClone(this.searchForm);
let o = this.timeDate || [];
if (o && o.length > 0) {
oParams.sDate = o[0];
oParams.eDate = o[1];
}
oParams.vin = this.$route.query.vin
return oParams;
},
// 获取列表
getList(options) {
let oParams = this.getParams();
oParams.pageSize = options ? options.pageSize || 10 : 10;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
DRIVE_DETAIL_SEARCH(oParams).then((res) => {
let { data } = res;
let { list, totalElements } = data;
this.pageTotal = totalElements;
this.tableData = list;
});
},
// 查看详情
lookDetail(row) {
console.log(row);
this.$router.push({ name: "mileageDetail" });
},
// 导出excel
downloadExcel() {
let _this = this;
let oParams = this.getParams();
_this.dloading = true;
_this.$Common.exportExcel({
url: `${_this.$store.state.baseURL}${DRIVE_STATISTICS_EXPORT}`,
method: "GET",
data: oParams,
fileName: "油耗统计报表",
success: () => {
_this.dloading = false;
},
fail: () => {
_this.dloading = false;
},
});
},
// 重置
rest(){
this.searchForm = {};
this.getList();
this.$refs.glsxTable.rest();
},
// 查看轨迹
lookTrack(row){
let path = `/oEshield#/monitor/replay?sn=${row.sn}&isInitFence=1&name=${row.name}&standno=${row.vin}&startTime=${row.journeyBeginTime||''}&endTime=${row.journeyEndTime||''}`;
//let query = {sn:row.sn,isInitFence:1,name:row.name,standno:row.vin};
let query = {}
//this.$router.push({path:path})
history.pushState(query, path, path);
}
},
};
</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>>
\ No newline at end of file
......@@ -3,164 +3,194 @@
<div class="container">
<h1>有效试驾(日报)</h1>
<div class="m-b-md">用于展示日运营数据并支持下载Excel文件</div>
<search-form
class="searchTop border-shadow"
:formModel="searchForm"
:formList="reportFormList"
>
<span
class="inline-b"
slot="form-slot"
>
<el-button
type="primary"
:size="btn_size"
icon="el-icon-search"
:id="reportTableParams.btnId"
>搜索</el-button>
<el-button
type="primary"
:size="btn_size"
icon="el-icon-refresh"
@click="refresh"
>重置</el-button>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="reportFormList">
<span class="inline-b" slot="form-slot">
<el-button type="primary" :size="btn_size" icon="el-icon-search" :id="reportTableParams.btnId" @click="getTableList()">搜索</el-button>
<el-button type="primary" :size="btn_size" icon="el-icon-refresh" @click="refresh">重置</el-button>
</span>
</search-form>
<h3>
有效试驾信息
<el-button
class="pull-right"
type="primary"
:size="btn_size"
@click="btnClick('export')"
>导出Excel</el-button>
<el-button class="pull-right" type="primary" :size="btn_size" @click="btnClick('export')">导出Excel</el-button>
</h3>
<basic-table
ref="reportTable"
:tableParams="reportTableParams"
:beforeSearchFn="beforeSearchFn"
:searchForm="searchDataForm"
:getListApi="getListApi"
:hasNum="false"
>
</basic-table>
<!-- <basic-table ref="reportTable" @click="goDetail" :tableParams="reportTableParams" :beforeSearchFn="beforeSearchFn" :searchForm="searchDataForm" :getListApi="getListApi" :hasNum="false">
</basic-table> -->
<el-table class="el_table" :data="tableDta" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
<el-table-column v-for="(item,index) in reportTableParams.tableColumns" :key="`td_${index}`" :label="item.label" :prop="item.prop" width="120px" fixed="left" show-overflow-tooltip></el-table-column>
<el-table-column v-for="(item,index) in dayList" :key="`tds_${index}`" :label="item.label" :prop="item.prop">
<template slot-scope="{row}">
<a href="javascript:void(0)" @click="goDetail(item.prop,row)">{{row[item.prop]}}</a>
</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="total,prev, pager, next, jumper" hide-on-single-page :total="totalElements" :page-size="pageSize" :current-page.sync="pageNumber" @current-change="getTableList" />
</div>
</div>
</div>
</template>
<script>
import { REPORT_API } from '@/config/config'
import store from '@/store'
import { getList, getYears } from 'services/report'
import { REPORT_API } from "@/config/config";
import store from "@/store";
import { getList, getYears } from "services/report";
import { deepClone, showToast } from "@/utils/util";
export default {
data() {
const _this = this
const _this = this;
return {
searchDataForm: {},
searchForm: {},
tableDta: [],
pageNumber: 1,
pageSize: 10,
totalElements:0,
reportFormList: [
{
type: 'input',
inputType: 'text',
prop: 'keywords',
placeholder: '特约店编码|店名称',
type: "input",
inputType: "text",
prop: "keywords",
placeholder: "特约店编码|店名称",
},
{
type: 'singleDate',
dateType: 'month',
prop: 'date',
placeholder: '请选择年月',
type: "singleDate",
dateType: "month",
prop: "date",
placeholder: "请选择年月",
pickerOptions: {
disabledDate(time) {
return time.getTime() < new Date(_this.date).getTime()
}
}
}
return time.getTime() < new Date(_this.date).getTime();
},
},
},
],
dayList: [],
reportTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
listName: "list",
tableOption: false,
tableColumns: [
{
label: '特约店编码',
prop: 'shopCode',
fixed: true
}, {
label: '特约店名称',
prop: 'shopName',
fixed: true
}, {
label: '车型',
prop: 'vehicleTypeName',
fixed: true
}, {
label: '车架号VIN码',
prop: 'vin',
label: "特约店编码",
prop: "shopCode",
fixed: true,
},
{
label: "特约店名称",
prop: "shopName",
fixed: true,
},
{
label: "车型",
prop: "vehicleTypeName",
fixed: true,
},
{
label: "车架号VIN码",
prop: "vin",
width: 120,
fixed: true
}, {
label: '时间',
prop: 'statDate',
fixed: true
}
]
fixed: true,
},
{
label: "时间",
prop: "statDate",
fixed: true,
},
],
},
getListApi: getList,
date: ''
}
date: "",
loading:false
};
},
mounted() {
getYears({}).then(res => {
console.log(res.data[0])
this.date = `${res.data[0]}-01-01`
})
getYears({}).then((res) => {
console.log(res.data[0]);
this.date = `${res.data[0]}-01-01`;
});
for (let i = 1; i <= 31; i++) {
this.reportTableParams.tableColumns.push({
this.dayList.push({
label: `${i}日`,
prop: `dayNum${i}`
})
prop: `dayNum${i}`,
});
if (i == 31) {
this.reportTableParams.tableColumns.push({
label: '总计',
prop: 'summation'
})
this.dayList.push({
label: "总计",
prop: "summation",
});
}
}
this.getTableList();
},
methods: {
// 获取参数
getParams() {
let oParams = deepClone(this.searchForm);
return oParams;
},
// 获取列表数据
getTableList(current) {
let oParams = this.getParams();
oParams.pageNumber = current || this.pageNumber;
oParams.pageSize = this.pageSize;
this.loading = true
getList(oParams).then((res) => {
this.loading = false
let { data } = res;
let { list, totalElements } = data || {};
this.tableDta = list;
this.totalElements = totalElements;
}).catch(error => {
this.loading = false
});
},
refresh() {
this.searchForm = {}
this.searchDataForm = {}
this.$refs.reportTable.refreshTable()
this.searchForm = {};
this.searchDataForm = {};
this.$refs.reportTable.refreshTable();
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm.date)
console.log(this.searchForm.date);
if (this.searchForm.date) {
this.searchDataForm.year = this.searchForm.date.split('-')[0]
this.searchDataForm.month = this.searchForm.date.split('-')[1]
this.searchDataForm.year = this.searchForm.date.split("-")[0];
this.searchDataForm.month = this.searchForm.date.split("-")[1];
} else {
this.searchDataForm.year = ''
this.searchDataForm.month = ''
this.searchDataForm.year = "";
this.searchDataForm.month = "";
}
this.searchDataForm.keywords = this.searchForm.keywords
resolve()
})
this.searchDataForm.keywords = this.searchForm.keywords;
resolve();
});
},
btnClick(type, scope) {
this.$Common.exportExcel({
url: `${store.state.baseURL}${REPORT_API.REPORT_EXPORT}`,
method: 'GET',
method: "GET",
data: this.searchDataForm,
fileName: '导出报表Excel'
})
}
fileName: "导出报表Excel",
});
},
// 查看详情
goDetail(id,row) {
let n = id.replace('dayNum','');
console.log(n)
console.log(row);
this.$router.push({name:'driverDetail',query:{day:`${row.statDate}-${n}`,vin:row.vin}})
},
},
}
};
</script>
<style>
<style lang="scss" scoped>
.pagination_list{
text-align:right;
padding:10px 0;
}
</style>
\ No newline at end of file
<template>
<div class="system-container">
<div class="container">
<h1>里程统计</h1>
<div class="m-b-md title_tips">用于统计用户的车辆行驶里程信息,并支持详情查看(仅针对有线/OBD设备)</div>
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="medium">
<el-form-item label="车辆归属:">
<!-- <el-input v-model="searchForm.dddd"></el-input> -->
<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">
</el-input>
</el-popover>
</el-form-item>
<el-form-item label="">
<el-input placeholder="工单号|车架号|姓名|设备" v-model="searchText">
<el-select class="pre_select" v-model="preText" slot="prepend" placeholder="请选择">
<el-option label="工单号" value="orderNo"></el-option>
<el-option label="车架号" value="vin"></el-option>
<el-option label="姓名" value="ownerName"></el-option>
<el-option label="设备" value="sn"></el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getList">搜索</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>
<div>
<el-popover placement="bottom-end" v-model="showPopover" trigger="click">
<div class="el_popover">
<div class="cell">
<div class="name">选择日期:</div>
<div class="txt">
<el-date-picker v-model="mileageDate" size="small" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
<div class="show_tips">提示:导出日期范围超过60天</div>
<div class="btn_group">
<el-button type="primary" size="small" :loading="cloading" @click="singleDownloadExcel">导出</el-button>
<el-button type="default" size="small" @click="showPopover = false">取消</el-button>
</div>
</div>
<el-button slot="reference" type="default" icon="el-icon-download" size="medium">日里程导出</el-button>
</el-popover>
<el-button class="pull-right" type="primary" icon="el-icon-download" size="medium" :loading="dloading" @click="downloadExcel">导出Excel</el-button>
</div>
</div>
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table ref="glsxTable" :list="tableData" :column="columnList" :pageTotal="pageTotal" @change="getList">
<div slot="operate" slot-scope="{scope}">
<el-link type="primary" :underline="false" @click="lookDetail(scope)">详情</el-link>
</div>
</glsx-table>
<!-- <div class="table_box">
<el-table :data="tableData" border>
<el-table-column label="工单号" prop=""></el-table-column>
<el-table-column label="姓名" prop=""></el-table-column>
<el-table-column label="设备号" prop=""></el-table-column>
<el-table-column label="车架号" prop=""></el-table-column>
<el-table-column label="总行驶次数" prop=""></el-table-column>
<el-table-column label="总里程km" prop=""></el-table-column>
<el-table-column label="操作" prop=""></el-table-column>
</el-table>
</div> -->
<!-- <basic-table ref="reportTable" :tableParams="reportTableParams" :beforeSearchFn="beforeSearchFn" :searchForm="searchDataForm" :getListApi="getListApi" @dataFinished="tableDataFinished" :hasNum="false">
</basic-table> -->
<!-- 列表 end -->
</div>
</div>
</template>
<script>
import GlsxTable from "@/components/glsx-table";
import {
GETMILEAGESTATISTICS,
MILEAGESTATISTICSEXPORT,
MILEAGEEXPORTDAILYDETAILS,
} from "services/report";
import GlsxOrganization from "@/components/glsx-organization";
import { deepClone, showToast } from "@/utils/util";
import store from "@/store";
export default {
components: {
GlsxTable,
GlsxOrganization,
},
data() {
return {
searchForm: {},
preText: "orderNo",
tableData: [],
columnList: [
{ label: "工单号", prop: "orderNo", align: "center" },
{ label: "姓名", prop: "ownerName" },
{ label: "设备号", prop: "sn" },
{ label: "车架号", prop: "vin" },
{ label: "总行驶次数", prop: "totalTripsNum" },
{ label: "总里程km", prop: "totalMileage" },
],
pageTotal: 0,
filterVisible: false,
searchText: "",
dloading: false,
showPopover: false,
mileageDate: [],
cloading: false,
};
},
mounted() {
this.getList();
},
methods: {
// 获取查询参数
getParams() {
let oParams = deepClone(this.searchForm);
if (this.searchText) {
oParams[this.preText] = this.searchText;
}
delete oParams.orgName;
return oParams;
},
// 获取列表
getList(options) {
let oParams = this.getParams();
console.log(this.searchForm);
oParams.pageSize = options ? options.pageSize || 10 : 10;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
GETMILEAGESTATISTICS(oParams).then((res) => {
let { data } = res;
let { list, totalElements } = data;
this.pageTotal = totalElements || 0;
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", query: { vin: row.vin } });
},
// 监听树
onChange(e) {
this.filterVisible = false;
console.log(e);
if (e) {
this.orgInfo = e.origin;
this.searchForm.orgId = e.origin.orgId;
this.searchForm.orgName = e.origin.orgName;
}
},
// 导出excel
downloadExcel() {
let _this = this;
let oParams = this.getParams();
_this.dloading = true;
_this.$Common.exportExcel({
url: `${store.state.baseURL}${MILEAGESTATISTICSEXPORT}`,
method: "GET",
data: oParams,
fileName: "里程统计报表",
success: () => {
_this.dloading = false;
},
fail: () => {
_this.dloading = false;
},
});
},
// 日里程导出
singleDownloadExcel() {
let _this = this;
let o = this.mileageDate;
if (!o || o.length <= 0) {
showToast({
message: "请选择日期",
});
return false;
}
let oParams = this.getParams();
oParams.mileageStartTime = o[0];
oParams.mileageEndTime = o[1];
_this.cloading = true;
_this.$Common.exportExcel({
url: `${store.state.baseURL}${MILEAGEEXPORTDAILYDETAILS}`,
method: "GET",
data: oParams,
fileName: "日里程统计报表",
success: () => {
_this.cloading = false;
},
fail: () => {
_this.cloading = false;
},
});
},
// 重置
rest() {
this.searchForm = {};
this.getList();
this.$refs.glsxTable.rest();
},
},
};
</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;
.pull-right {
margin-left: 10px;
}
}
.el_popover {
.cell {
// display: flex;
// align-items: center;
.name {
width: 80px;
line-height: 2;
}
}
.show_tips {
//padding-left: 80px;
color: #f00;
font-size: 12px;
line-height: 2;
}
.btn_group {
text-align: right;
}
}
</style>>
\ No newline at end of file
<template>
<div class="system-container">
<div class="container">
<h1>里程详情</h1>
<div class="m-b-md title_tips">用于统计和展示单个有线/OBD设备的历史行程信息</div>
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="medium">
<el-form-item label="日期:">
<el-date-picker v-model="dateTime" type="daterange" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="设备号:">
<!-- <el-input placeholder="工单号|车架号|姓名|设备" v-model="searchForm.input3">
<template slot="prepend">设备号</template>
</el-input> -->
<el-select v-model="searchForm.sn">
<el-option v-for="item in snList" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getList()">搜索</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="medium" :loading="dloading" @click="downloadExcel()">导出Excel</el-button>
</div>
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table ref="glsxTable" :list="tableData" :column="columnList" :pageTotal="pageTotal" @change="getList">
<div slot="operate" slot-scope="{scope}">
<el-link type="primary" :underline="false" @click="lookTrack(scope)">查看轨迹</el-link>
</div>
</glsx-table>
<!-- <div class="table_box">
<el-table :data="tableData" border>
<el-table-column label="工单号" prop=""></el-table-column>
<el-table-column label="姓名" prop=""></el-table-column>
<el-table-column label="设备号" prop=""></el-table-column>
<el-table-column label="车架号" prop=""></el-table-column>
<el-table-column label="总行驶次数" prop=""></el-table-column>
<el-table-column label="总里程km" prop=""></el-table-column>
<el-table-column label="操作" prop=""></el-table-column>
</el-table>
</div> -->
<!-- <basic-table ref="reportTable" :tableParams="reportTableParams" :beforeSearchFn="beforeSearchFn" :searchForm="searchDataForm" :getListApi="getListApi" @dataFinished="tableDataFinished" :hasNum="false">
</basic-table> -->
<!-- 列表 end -->
</div>
</div>
</template>
<script>
import GlsxTable from "@/components/glsx-table";
import { MILEAGE_GETDAILYSEARCH, MILEAGE_GETSN,MILEAGE_STATISTICS_EXPORT } from "services/report";
import { deepClone,showToast } from "@/utils/util";
import moment from "moment";
export default {
data() {
return {
searchForm: {},
snList: [],
dateTime: [],
tableData: [],
columnList: [
{ label: "工单号", prop: "orderNo" },
{ label: "姓名", prop: "ownerName" },
{ label: "设备号", prop: "sn" },
{ label: "车架号", prop: "vin" },
{
label: "行程开始/结束时间",
prop: "mileageStartTime",
formatter: (row) => {
return `${row.mileageStartTime}~${row.mileageEndTime}`;
},
},
{ label: "行驶时长", prop: "drivingTime" },
{
label: "行驶里程km",
prop: "drivingMileage",
formatter: (row) => {
return `${row.drivingMileage || 0}km`;
},
},
],
pageTotal: 0,
pickerOptions: {
shortcuts: [
{
text: "昨日",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
picker.$emit("pick", [start, end]);
},
},
{
text: "本周",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment().weekday(1).format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "上周",
onClick(picker) {
let weekOfDay = parseInt(moment().format("E"));
const end = moment()
.subtract(weekOfDay, "days")
.format("YYYY-MM-DD");
const start = moment()
.subtract(weekOfDay + 7 - 1, "days")
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "本月",
onClick(picker) {
const start = moment().add("month", 0).format("YYYY-MM") + "-01";
const end = moment().format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "上月",
onClick(picker) {
const end = moment()
.month(moment().month() - 1)
.endOf("month")
.format("YYYY-MM-DD");
const start = moment()
.month(moment().month() - 1)
.startOf("month")
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
],
},
dloading:false
};
},
components: {
GlsxTable,
},
created() {
this.getSn();
},
mounted() {
const startDate = moment().weekday(1).format("YYYY-MM-DD");
console.log(startDate);
//this.getTableList();
},
methods: {
// 获取查询参数
getParams() {
let oParams = deepClone(this.searchForm);
let o = this.dateTime;
if (o && o.length > 0) {
oParams.mileageStartTime = o[0];
oParams.mileageEndTime = o[0];
}
oParams.vin = this.$route.query.vin;
return oParams;
},
// 获取列表
getList(options) {
let oParams = this.getParams();
oParams.pageSize = options ? options.pageSize || 10 : 10;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
MILEAGE_GETDAILYSEARCH(oParams).then((res) => {
let { data } = res;
let { list, totalElements } = data||{};
this.pageTotal = totalElements;
this.tableData = list;
});
},
// 获取设备列表
getSn() {
let oParams = { vin: this.$route.query.vin };
MILEAGE_GETSN(oParams).then((res) => {
let list = res.data || [];
this.snList = res.data || [];
this.$set(this.searchForm,'sn',list[0] || "")
this.getList();
});
},
// 查看轨迹
lookTrack(row) {
console.log(row);
let path = `/oEshield#/monitor/replay?sn=${row.sn}&isInitFence=1&name=${
row.ownerName
}&standno=${row.vin}&startTime=${row.mileageStartTime || ""}&endTime=${
row.mileageEndTime || 0
}`;
//let query = {sn:row.sn,isInitFence:1,name:row.name,standno:row.vin};
let query = {};
//this.$router.push({path:path})
history.pushState(query, path, path);
},
// 导出excel
downloadExcel() {
let _this = this;
let oParams = this.getParams();
_this.dloading = true;
_this.$Common.exportExcel({
url: `${this.$store.state.baseURL}${MILEAGE_STATISTICS_EXPORT}`,
method: "GET",
data: oParams,
fileName: "里程详情报表",
success: () => {
_this.dloading = false;
},
fail: () => {
_this.dloading = false;
},
});
},
// 重置
rest(){
this.searchForm = {};
this.getList();
this.$refs.glsxTable.rest();
},
},
};
</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>>
\ No newline at end of file
<template>
<div class="system-container">
<div class="container">
<h1>油耗统计</h1>
<div class="m-b-md title_tips">统计车辆油耗情况,以自然日为时间单位统计(此功能仅针对OBD设备)</div>
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="medium">
<el-form-item label="关键字:">
<el-input v-model="searchForm.keyWord" placeholder="特约店编码|店名称|车架号|车型"></el-input>
</el-form-item>
<el-form-item label="年份:">
<el-select v-model="searchForm.year" placeholder="请选择" @change="onChange">
<el-option v-for="(item,index) in yearList" :key="`year_${index}`" :label="`${item}年`" :value="item"></el-option>
<!-- <el-option label="2020年" value="2020"></el-option>
<el-option label="2019年" value="2019"></el-option>
<el-option label="2018年" value="2018"></el-option> -->
</el-select>
</el-form-item>
<el-form-item label="月份:">
<el-select v-model="searchForm.month" placeholder="请选择" @change="onChange">
<el-option label="1月" value="1"></el-option>
<el-option label="2月" value="2"></el-option>
<el-option label="3月" value="3"></el-option>
<el-option label="4月" value="4"></el-option>
<el-option label="5月" value="5"></el-option>
<el-option label="6月" value="6"></el-option>
<el-option label="7月" value="7"></el-option>
<el-option label="8月" value="8"></el-option>
<el-option label="9月" value="9"></el-option>
<el-option label="10月" value="10"></el-option>
<el-option label="11月" value="11"></el-option>
<el-option label="12月" value="12"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getList()">搜索</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="medium" :loading="dloading" @click="downloadExcel()">导出Excel</el-button>
</div>
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table ref="glsxTable" :list="tableData" :column="tableColumnList" :pageTotal="pageTotal" @change="getList">
</glsx-table>
<!-- <div class="table_box">
<el-table :data="tableData" border>
<el-table-column label="工单号" prop=""></el-table-column>
<el-table-column label="姓名" prop=""></el-table-column>
<el-table-column label="设备号" prop=""></el-table-column>
<el-table-column label="车架号" prop=""></el-table-column>
<el-table-column label="总行驶次数" prop=""></el-table-column>
<el-table-column label="总里程km" prop=""></el-table-column>
<el-table-column label="操作" prop=""></el-table-column>
</el-table>
</div> -->
<!-- <basic-table ref="reportTable" :tableParams="reportTableParams" :beforeSearchFn="beforeSearchFn" :searchForm="searchDataForm" :getListApi="getListApi" @dataFinished="tableDataFinished" :hasNum="false">
</basic-table> -->
<!-- 列表 end -->
</div>
</div>
</template>
<script>
import GlsxTable from "@/components/glsx-table";
import { OIL_STATISTICS_SEARCH,OIL_YEARS_LIST,OIL_STATISTICS_EXPORT } from "services/report";
import moment from "moment";
import {deepClone} from '@/utils/util'
export default {
data() {
return {
searchForm: {},
tableData: [],
columnList: [
{ label: "特约店代码", prop: "shopCode",fixed:'left',width:'120px' },
{ label: "特约店名称", prop: "shopName",fixed:'left',width:'180px' },
{ label: "车型", prop: "modelName",fixed:'left',width:'220px' },
{ label: "设备号", prop: "sn",fixed:'left',width:'200px' },
{ label: "车架号VIN码", prop: "vin",fixed:'left',width:'200px' },
{ label: "时间", prop: "statDate",fixed:'left',width:'120px' },
],
tableColumnList:[],
pageTotal: 0,
yearList:[],
dloading:false
};
},
components: {
GlsxTable,
},
mounted() {
this.getYear();
this.initColumn();
this.getList();
},
methods: {
// 获取查询参数
getParams() {
let oParams = deepClone(this.searchForm);
return oParams;
},
// 获取列表
getList(options) {
let oParams = this.getParams();
oParams.pageSize = options ? options.pageSize || 10 : 10;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
OIL_STATISTICS_SEARCH(oParams).then((res) => {
let { data } = res;
let { list, totalElements } = data;
this.pageTotal = totalElements;
this.tableData = list;
});
},
// 查看详情
lookDetail(row) {
console.log(row);
this.$router.push({ name: "mileageDetail" });
},
/** 初始化 表格日期 */
initColumn(e) {
console.log(e)
let y = this.searchForm.year || moment().date();
let m = this.searchForm.month || moment().month() + 1;
let day = moment(`${y}-${m}`, "YYYY-MM").daysInMonth();
let list = deepClone(this.columnList);
for(let i = 1,len = day;i<=len;i++){
let o = {label:`${i}日`,prop:`dayNum${i}`}
list.push(o)
}
list.push({label:'总计',prop:'summation'})
this.tableColumnList = list
},
//监听月份和年份 切换
onChange(){
this.initColumn();
},
// 重置
rest(){
this.searchForm = {};
this.getList();
this.$refs.glsxTable.rest();
},
// 获取年份
getYear(){
OIL_YEARS_LIST().then(res => {
this.yearList = res.data || []
})
},
// 导出excel
downloadExcel() {
let _this = this;
let oParams = this.getParams();
_this.dloading = true;
_this.$Common.exportExcel({
url: `${_this.$store.state.baseURL}${OIL_STATISTICS_EXPORT}`,
method: "GET",
data: oParams,
fileName: "油耗统计报表",
success: () => {
_this.dloading = false;
},
fail: () => {
_this.dloading = false;
},
});
},
},
};
</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>>
\ No newline at end of file
<template>
<div class="system-container">
<div class="container">
<h1>试乘试驶汇总统计</h1>
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="medium">
<el-form-item label="关键字:">
<el-input v-model="searchForm.dddd" placeholder="特约店编码|店名称"></el-input>
</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">重置</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="medium" @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";
export default {
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,
};
},
components: {
GlsxTable,
},
mounted() {
this.getTableList();
},
methods: {
// 获取列表
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" });
},
},
};
</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>>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!