Commit 4cd402a7 by 张晓玮

Merge branch 'v1.7.0' into 'develop'

v1.7.0版本需求已经上线,代码合并到develop

See merge request !24
2 parents c7f50bd3 4fdc5ec3
This diff could not be displayed because it is too large.
//常量定义
//车辆用途
export const VEHICLE_USE_LIST = [
{
label: "专属用途",
value: "1",
},
{
label: "非专属用途",
value: "2",
},
{
label: '专属用途',
value: '1',
},
{
label: '非专属用途',
value: '2',
},
]
// 车辆标签
export const VEHICLE_TAG_LIST = [
{
label: "试驶车 ",
value: "1",
},
{
label: "服务车",
value: "3",
},
{
label: "代步车",
value: "4",
},
{
label: "救援车",
value: "5",
},
{
label: "办公车",
value: "6",
},
{
label: "其他",
value: "7",
},
{
label: '试驶车 ',
value: '1',
},
{
label: '服务车',
value: '3',
},
{
label: '代步车',
value: '4',
},
{
label: '救援车',
value: '5',
},
{
label: '办公车',
value: '6',
},
{
label: '其他',
value: '7',
},
]
// 围栏列表-监控类型
export const FENCE_MONITOR_LIST = [
{ label: '驶入', value: '1' },
{ label: '驶出', value: '2' },
{ label: '驶入驶出', value: '3' },
{ label: '驶入', value: '1' },
{ label: '驶出', value: '2' },
{ label: '驶入驶出', value: '3' },
]
// 围栏列表-状态
export const FENCE_TYPE_LIST = [
{ label: '已开启', value: '1' },
{ label: '已关闭', value: '0' },
{ label: '已开启', value: '1' },
{ label: '已关闭', value: '0' },
]
// 车辆在线状态
export const VEHICLE_ONLINE_STATUS = [
{ label: '行驶中', value: 0 },
{ label: '静止', value: 1 },
{ label: '离线', value: 2 },
{ label: '在线', value: 3 },
]
\ No newline at end of file
{ label: '行驶中', value: 0 },
{ label: '静止', value: 1 },
{ label: '离线', value: 2 },
{ label: '在线', value: 3 },
]
// 是否结清
export const SETTLEFLAGLIST = {
0: '未结清',
1: '已结清',
}
export const SETTLE_FLAG_LIST = [
{ label: '未结清', value: 0 },
{ label: '已结清', value: 1 },
]
import moment from '@/common/moment';
import moment from '@/common/moment'
// 全部
let allDays = {
text: '全部',
onClick(picker) {
picker.$emit('pick', [])
},
}
// 本月
let currentMonth = {
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])
},
}
// 今日
let currentDay = {
text: '今日',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
picker.$emit('pick', [end, end])
},
}
// 昨日
let yesterday = {
text: '昨日',
onClick(picker) {
const start = moment()
.day(moment().day() - 1)
.format('YYYY-MM-DD')
const end = moment()
.day(moment().day() - 1)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 近3天
let nearly3Days = {
text: '近3天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 2)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// 近7天
let nearly7Days = {
text: '近7天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 6)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 近15天
let nearly15Days = {
text: '近15天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 14)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 近30天
let nearly30Days = {
text: '近30天',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment()
.day(moment().day() - 29)
.format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
}
}
// 上月
let lastMonth = {
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])
},
}
// 上周
let lastWeek = {
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])
},
}
// 本周
let currentWeek = {
text: '本周',
onClick(picker) {
const end = moment().format('YYYY-MM-DD')
const start = moment().weekday(0).format('YYYY-MM-DD')
picker.$emit('pick', [start, end])
},
}
// 警情中心-围栏报警
export const fenceShortcuts = [
{
text: "全部",
onClick(picker) {
picker.$emit("pick", []);
},
}, {
text: "今日",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
picker.$emit("pick", [end, end]);
}
}, {
text: "昨日",
onClick(picker) {
const start = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD");
const end = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
}
},
{
text: "近7天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 6)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
}
},
{
text: "近15天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 14)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近30天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 29)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
}
allDays,
currentDay,
yesterday,
nearly7Days,
nearly15Days,
nearly30Days
]
// 警情中心-停驶报警
export const shutDownShortcuts = [
{
text: "全部",
onClick(picker) {
picker.$emit("pick", []);
},
},
{
text: "近3天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 2)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
}
},
{
text: "近7天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 6)
.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]);
},
},
allDays,
nearly3Days,
nearly7Days,
currentMonth,
]
// 里程统计详情
export const mileageDetailShortcuts = [
{
text: "全部",
onClick(picker) {
picker.$emit("pick", []);
},
},
{
text: "昨日",
onClick(picker) {
const start = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD");
const end = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
}
},
{
text: "本周",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment().weekday(0).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]);
},
},
allDays,
yesterday,
currentWeek,
lastWeek,
currentMonth,
lastMonth
]
// 设备激活时间
export const deviceActivedShortcuts = [
allDays,
currentDay,
nearly7Days,
currentMonth,
lastMonth,
nearly30Days
]
// 超速报警
export const speedShortcuts = [
allDays,
yesterday,
lastWeek,
currentMonth,
lastMonth,
]
// 运营统计报表-车辆维度
export const staticReportCarShortcuts = [
allDays,
yesterday,
currentWeek,
lastWeek,
currentMonth,
lastMonth
]
\ No newline at end of file
<template>
<div class="glsx_table_box">
<el-table class="el_table" :data="tableData" border :size="size" v-loading="loading">
<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 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>
<template slot-scope="{row}">{{row[item.prop]||'--'}}</template>
</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>
......@@ -9,7 +11,7 @@
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :page-size.sync="currentPage" :page-sizes="pageSizes" :current-page.sync="currentPage" @current-change="getList" @size-change="changePageSize" />
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :page-size.sync="pageSize" :page-sizes="pageSizes" :current-page.sync="currentPage" @current-change="getList" @size-change="changePageSize" />
</div>
</div>
</template>
......@@ -73,16 +75,27 @@ export default {
return {
currentPage: 1,
pageSize: 10,
pageTotal:0,
tableData:[],
loading:false
pageTotal: 0,
tableData: [],
loading: false,
};
},
watch: {
params: {
handler: function (n, o) {
if (n) {
console.log(n);
this.getList();
}
},
immediate: true,
},
},
created() {},
mounted() {
if (this.request) {
this.getList();
}
// if (this.request) {
// this.getList();
// }
},
methods: {
/**
......@@ -90,33 +103,44 @@ export default {
*/
changePageSize: function (e) {
this.pageSize = e;
this.currentPage = 1;
this.getList();
},
// 获取参数
getParams(current){
let oParams = {...this.params};
getParams(current) {
console.log(this.params);
let oParams = { ...this.params };
if (current || oParams.current) {
this.currentPage = current || oParams.current;
}
oParams.pageSize = this.pageSize;
oParams.pageNumber = current || this.currentPage;
return oParams
oParams.pageNumber = current || oParams.current || this.currentPage;
delete oParams.current;
return oParams;
},
// 获取列表
getList(current) {
let request = this.request;
let oParams = this.getParams(current);
this.loading = true
request(oParams).then((res) => {
this.loading = false
if(res.code != 200){
return false;
}
let {data:{list,totalElements}} = res;
this.tableData = list||[]
this.pageTotal = totalElements
}).catch(error => {
this.loading = false
});
console.log(oParams);
this.loading = true;
request(oParams)
.then((res) => {
this.loading = false;
if (res.code != 200) {
return false;
}
let {
data: { list, totalElements },
} = res;
this.tableData = list || [];
this.pageTotal = totalElements;
})
.catch((error) => {
this.loading = false;
});
},
// 重置
......@@ -125,6 +149,13 @@ export default {
this.currentPage = 1;
this.getList();
},
// 重置分页参数
restParams() {
// this.pageSize = 10;
this.currentPage = 1;
this.pageSize = 10
},
},
};
</script>
......
......@@ -31,6 +31,7 @@ function render({ data = {} , container } = {}) {
routes,
});
store.state.baseURL = data.baseURL;
Vue.prototype.$hasPermission = data.common.hasPermission
instance = new Vue({
router,
store,
......
......@@ -55,4 +55,15 @@ export const GET_FENCEALARM_LIST = (params) => {
// 警情中心-围栏报警-导出excel
export const ALARM_FENCEALARM_EXPORT = (params) => {
return request(params, "/alarmcenternew/fencealarm/export");
}
\ No newline at end of file
}
// 警情中心-超速报警-获取列表
export const GET_SPEEDING_SEARCH = (params) => {
return request(params, "/alarmcenternew/speeding/search");
}
// 警情中心-超速报警-获取列表-导出excel
export const GET_SPEEDING_EXPORT = (params) => {
return request(params, "/alarmcenternew/speeding/export");
}
......@@ -5,18 +5,18 @@ import store from "@/store";
const BASEURL = store.state.baseURL
// 获取报表列表
function getList (params) {
function getList(params) {
const url = REPORT_API.REPORT_SEARCH
return request(params, url)
}
// 获取报表列表
function getYears (params) {
function getYears(params) {
const url = REPORT_API.REPORT_YEARS
return request(params, url)
}
function getOutStoreList (params) {
function getOutStoreList(params) {
return request(params, '/trialdrive/notinstorereport/search')
}
......@@ -138,4 +138,26 @@ export const EXPORT_BATTERY_LIST = params => {
return request(params, '/alarmcenternew/battery/export')
}
// 报表管理-运营报表统计-获取设备维度列表
export const GET_OPEREPORT_DEVICE_SEARCH = params => {
return request(params, '/trialdrive/opereport/device/search')
}
// 报表管理-运营报表统计-设备维度列表-导出excel
export const GET_OPEREPORT_DEVICE_EXPORT = params => {
return request(params, '/trialdrive/opereport/device/export')
}
// 报表管理-运营报表统计-获取车辆维度列表
export const GET_OPEREPORT_VEHICLE_SEARCH = params => {
return request(params, '/trialdrive/opereport/vehicle/search')
}
// 报表管理-运营报表统计-获取车辆维度列表
export const GET_OPEREPORT_VEHICLE_EXPORT = params => {
return request(params, '/trialdrive/opereport/vehicle/export')
}
export { getList, getYears, getOutStoreList }
......@@ -159,7 +159,7 @@
}
.small_select {
width: 120px;
width: 140px;
}
}
......
......@@ -8,6 +8,7 @@
line-height: 2;
}
.h2 {
position: relative;
font-size: 18px;
font-weight: bold;
color: #666;
......
......@@ -120,7 +120,7 @@ export default {
created() {
console.log(history.state);
let query = this.$route.query;
this.fenceId = query.fenceId || "";
// this.fenceId = query.fenceId || "";
if (query.name) {
this.$set(this.searchForm, "keywords", query.name);
}
......
......@@ -78,6 +78,11 @@
<el-table-column label="最后GPS定位地址" prop="lastGpsAddress" show-overflow-tooltip width="240">
<template slot-scope="{row}">{{row.lastGpsAddress||'--'}}</template>
</el-table-column>
<el-table-column label="操作" prop="lastGpsAddress">
<template slot-scope="{row}">
<el-link class="el_link" type="primary" @click="lookDetail(row)">常驻地</el-link>
</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :current-page.sync="currentPage" :page-size="pageSize" :page-sizes="pageSizes" @current-change="getList" @size-change="changePageSize" />
......@@ -90,15 +95,18 @@
<script>
import { shutDownShortcuts } from "@/common";
import GlsxOrganization from "@/components/glsx-organization";
import { GET_ALARM_SHUTDOWN, ALARM_SHUTDOWN_EXPORT } from "@/services/alarmCenter";
import { deepClone, showToast,downFileByPath } from "@/utils/util";
import {
GET_ALARM_SHUTDOWN,
ALARM_SHUTDOWN_EXPORT,
} from "@/services/alarmCenter";
import { deepClone, showToast, downFileByPath } from "@/utils/util";
export default {
components: {
GlsxOrganization,
},
data() {
return {
searchForm: {stayRange:2},
searchForm: { stayRange: 2 },
currentPage: 1,
pageSizes: [10, 20, 30, 40],
pageSize: 10,
......@@ -157,8 +165,8 @@ export default {
oParams.pageSize = this.pageSize;
oParams.pageNumber = current || this.currentPage;
this.tloading = true;
if(current){
this.currentPage = current
if (current) {
this.currentPage = current;
}
GET_ALARM_SHUTDOWN(oParams).then((res) => {
this.tloading = false;
......@@ -197,10 +205,16 @@ export default {
if (res.code != 200) {
return false;
}
downFileByPath(res.data)
downFileByPath(res.data);
//window.open(res.data);
});
},
// 查看常驻地
lookDetail(row) {
let path = `/oEshield#/monitor/resident?sn=${row.sn}&name=${encodeURI(row.ownerName)}&standno=${row.vin}&locationType=${row.locationType}`;
window.open(path);
},
},
};
</script>
......@@ -215,7 +229,7 @@ export default {
.el_radio_group {
vertical-align: middle;
}
.table_box{
.table_box {
margin-top: 0;
}
</style>
\ No newline at end of file
......@@ -2,7 +2,22 @@
<div class="">
<div class="page_title">
<h2 class="h2">超速报警</h2>
<h2 class="h2">
<span>超速报警</span>
<el-popover placement="right-start" trigger="hover">
<div class="popover_box">
<h3 class="h3">上点时间间隔:</h3>
<p>默认为15s</p>
<h3 class="h3">超速开始时间:</h3>
<p>当连续两个上点的速度>=90km/h时,取第一个上点的上点时间作为该段超速记录的超速开始时间</p>
<h3 class="h3">超速结束时间:</h3>
<p>当连续两个上点的速度&lt;=90km/h时,取第一个上点的上点时间作为该段超速记录的超速结束时间</p>
<h3 class="h3">平均车速:</h3>
<p>即超速区间内的平均时速;平均车速 = 超速区间内所有上点的速度之和÷上点数</p>
</div>
<span class="title_tip_icon" slot="reference"><i class="el-icon-question"></i></span>
</el-popover>
</h2>
<h3 class="h3">用于统计和展示有线设备的超速报警</h3>
</div>
......@@ -10,7 +25,7 @@
<div class="search_box">
<el-form :inline="true" size="small">
<el-form-item label="关键字">
<el-input v-model.trim="searchForm.keywords" class="long_input" placeholder="设备号 | 车架号 | 姓名 | 工单号" maxlength="20"></el-input>
<el-input v-model.trim="searchForm.keywords" class="long_input" placeholder="设备号 | 车架号 | 姓名 | 业务工单号" maxlength="20"></el-input>
</el-form-item>
<el-form-item label="车辆归属:">
<el-popover v-model="filterVisible" placement="bottom-start" width="400" trigger="click">
......@@ -45,8 +60,8 @@
<!-- 表格区域 开始 -->
<div class="table_box">
<el-table class="el_table" :data="tableData" border size="small" v-loading="tloading">
<el-table-column label="工单号" prop="bizOrderNo" show-overflow-tooltip>
<template slot-scope="{row}">{{row.bizOrderNo||'--'}}</template>
<el-table-column label="业务工单号" prop="workOrderNo" show-overflow-tooltip>
<template slot-scope="{row}">{{row.workOrderNo||'--'}}</template>
</el-table-column>
<el-table-column label="姓名" prop="ownerName" show-overflow-tooltip>
<template slot-scope="{row}">{{row.ownerName||'--'}}</template>
......@@ -55,10 +70,18 @@
<el-table-column label="车架号" prop="vin" show-overflow-tooltip>
<template slot-scope="{row}">{{row.vin||'--'}}</template>
</el-table-column>
<el-table-column label="超速开始时间" prop="alarmTime" show-overflow-tooltip></el-table-column>
<el-table-column label="超速结束时间" prop="alarmTime" show-overflow-tooltip></el-table-column>
<el-table-column label="超速时长" prop="duration" show-overflow-tooltip></el-table-column>
<el-table-column label="平均车速" prop="fenceName" show-overflow-tooltip></el-table-column>
<el-table-column label="超速开始时间" prop="beginTime" show-overflow-tooltip>
<template slot-scope="{row}">{{row.beginTime||'--'}}</template>
</el-table-column>
<el-table-column label="超速结束时间" prop="endTime" show-overflow-tooltip>
<template slot-scope="{row}">{{row.endTime||'--'}}</template>
</el-table-column>
<el-table-column label="超速时长" prop="durationFormat" show-overflow-tooltip>
<template slot-scope="{row}">{{row.durationFormat||'--'}}</template>
</el-table-column>
<el-table-column label="平均车速" prop="averageSpeed" show-overflow-tooltip>
<template slot-scope="{row}">{{(row.averageSpeed||row.averageSpeed == 0)?row.averageSpeed + 'km/h':'--'}}</template>
</el-table-column>
</el-table>
<div class="pagination_list">
<el-pagination background layout="sizes, total,prev, pager, next, jumper" :total="pageTotal" :current-page.sync="currentPage" :page-size="pageSize" :page-sizes="pageSizes" @current-change="getList" @size-change="changePageSize" />
......@@ -69,15 +92,13 @@
</div>
</template>
<script>
import moment from "moment";
import { fenceShortcuts } from "@/common";
import { speedShortcuts } from "@/common";
import GlsxOrganization from "@/components/glsx-organization";
import {
GET_FENCEALARM_LIST,
ALARM_FENCEALARM_EXPORT,
GET_SPEEDING_EXPORT,
GET_SPEEDING_SEARCH,
} from "@/services/alarmCenter";
import { deepClone, showToast, downFileByPath } from "@/utils/util";
import { FENCE_MONITOR_LIST } from "@/common/constants";
export default {
components: {
GlsxOrganization,
......@@ -95,19 +116,15 @@ export default {
showResult: false,
loading: false,
offPickerOptions: {
shortcuts: fenceShortcuts,
shortcuts: speedShortcuts,
},
filterVisible: false,
orgInfo: {},
dloading: false,
tloading: false,
FENCE_MONITOR_LIST,
fenceId: "",
};
},
created() {
console.log(history.state);
this.fenceId = history.state.fenceId;
this.getList();
},
mounted() {},
......@@ -126,12 +143,8 @@ export default {
let oParams = deepClone(this.searchForm);
let m = oParams.timeDate;
if (m && m.length > 0) {
oParams.alarmStartTime = m[0];
oParams.alarmEndTime = m[1];
}
if (this.fenceId) {
oParams.fenceId = this.fenceId;
oParams.startTime = m[0];
oParams.endTime = m[1];
}
delete oParams.orgName;
......@@ -148,7 +161,7 @@ export default {
if (current) {
this.currentPage = current;
}
GET_FENCEALARM_LIST(oParams).then((res) => {
GET_SPEEDING_SEARCH(oParams).then((res) => {
this.tloading = false;
let obj = res.data || {};
this.tableData = obj.list || [];
......@@ -180,7 +193,7 @@ export default {
let oParams = this.getParams();
_this.dloading = true;
ALARM_FENCEALARM_EXPORT(oParams).then((res) => {
GET_SPEEDING_EXPORT(oParams).then((res) => {
_this.dloading = false;
if (res.code != 200) {
return false;
......@@ -189,23 +202,6 @@ export default {
downFileByPath(res.data);
});
},
// 查看轨迹回放
lookDetail(row) {
let startTime = row.alarmTime
? moment(row.alarmTime).format("x") - 120000
: "";
let sTime = moment(startTime).format("yyyy-MM-DD HH:mm:ss");
let endTime = row.endTime || "";
let eTime = moment(endTime).format("yyyy-MM-DD HH:mm:ss");
if (!row.endTime) {
eTime = moment(startTime + 3600000).format("yyyy-MM-DD HH:mm:ss");
}
console.log(sTime + "---" + eTime);
let path = `/oEshield#/monitor/replay?sn=${row.sn}&name=${row.ownerName}&standno=${row.vin}&startTime=${sTime}&endTime=${eTime}&fenceId=${row.fenceId}&isInitFence=1`;
//this.$root.parentCommon.setBreadCrumbs(path);
window.open(path);
},
},
};
</script>
......
......@@ -172,7 +172,8 @@ export default {
// 查看详情
lookDetail(row) {
let path = `/trialRun#/alarmCenter/fence`;
let endPath = `${path}?fenceId=${row.id}&name=${row.fenceName}`
// let endPath = `${path}?fenceId=${row.id}&name=${row.fenceName}`
let endPath = `${path}?name=${row.fenceName}`
this.$root.parentCommon.setBreadCrumbs(path);
history.pushState({}, endPath, endPath);
//this.$router.push({ path: path, query: { fenceId: row.id,name:row.name } });
......
......@@ -52,16 +52,36 @@
<!-- 表格区域 开始 -->
<div class="table_box">
<el-table class="el_table" :data="tableData" border size="small" v-loading="tloading">
<el-table-column label="工单号" prop="workOrderNo"></el-table-column>
<el-table-column label="姓名" prop="ownerName"></el-table-column>
<el-table-column label="车架号" prop="vin"></el-table-column>
<el-table-column label="设备号" prop="sn"></el-table-column>
<el-table-column label="工单号" prop="workOrderNo">
<template slot-scope="{row}">{{row.workOrderNo||'--'}}</template>
</el-table-column>
<el-table-column label="姓名" prop="ownerName">
<template slot-scope="{row}">{{row.ownerName||'--'}}</template>
</el-table-column>
<el-table-column label="车架号" prop="vin">
<template slot-scope="{row}">{{row.vin||'--'}}</template>
</el-table-column>
<el-table-column label="设备号" prop="sn">
<template slot-scope="{row}">{{row.sn||'--'}}</template>
</el-table-column>
<el-table-column label="设备类型" prop="deviceTypeStr">
<template slot-scope="{row}">{{(row.deviceTypeStr||'') + (row.sourceStr && row.deviceTypeStr?'/':'') + (row.sourceStr||'')}}</template>
</el-table-column>
<el-table-column label="是否在线" prop="isOnLineStr"></el-table-column>
<el-table-column label="车辆归属" prop="shopName"></el-table-column>
<el-table-column label="激活时间" prop="activeDate"></el-table-column>
<el-table-column label="是否在线" prop="isOnLineStr">
<template slot-scope="{row}">{{row.isOnLineStr||'--'}}</template>
</el-table-column>
<el-table-column label="车辆归属" prop="shopName">
<template slot-scope="{row}">{{row.shopName||'--'}}</template>
</el-table-column>
<el-table-column label="激活时间" prop="activeDate">
<template slot-scope="{row}">{{row.activeDate||'--'}}</template>
</el-table-column>
<el-table-column label="激活经纬度" prop="lngAndLat">
<template slot-scope="{row}">{{row.lngAndLat||'--'}}</template>
</el-table-column>
<el-table-column label="激活地址" prop="activeAddress">
<template slot-scope="{row}">{{row.activeAddress||'--'}}</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180px">
<template slot-scope="{row}">
<el-link class="el_link" type="primary" @click="lookLocation(row)" v-if="row.gpsLng|| row.bsLng">查看激活位置</el-link>
......@@ -84,7 +104,7 @@ import {
GET_DEVICEACTIVE_EXPORT,
} from "@/services/report";
import { deepClone, showToast } from "@/utils/util";
import store from "@/store";
import {deviceActivedShortcuts} from '@/common'
export default {
components: {
GlsxOrganization,
......@@ -102,63 +122,7 @@ export default {
showResult: false,
loading: false,
pickerOptions: {
shortcuts: [
{
text: "全部",
onClick(picker) {
const end = "";
const start = "";
picker.$emit("pick", [start, end]);
},
},
{
text: "今日",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment().format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "昨日",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment().format("YYYY-MM-DD");
start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
picker.$emit("pick", [start, end]);
},
},
{
text: "近7天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 7)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近15天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 15)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近30天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 30)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
],
shortcuts: deviceActivedShortcuts,
},
filterVisible: false,
orgInfo: {},
......
......@@ -163,7 +163,7 @@ export default {
// 获取列表
getList(options) {
let oParams = this.getParams();
oParams.pageSize = this.$refs.glsxTable.pageSize;
oParams.pageSize = this.$refs.glsxTable.pageSizeNum;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
this.loading = true;
GETMILEAGESTATISTICS(oParams)
......@@ -259,8 +259,8 @@ export default {
this.searchText = "";
this.preText = "orderNo";
this.mileageDate = []
this.getList();
this.$refs.glsxTable.rest();
this.getList();
},
},
};
......
......@@ -193,7 +193,7 @@ export default {
// 获取列表
getList(options) {
let oParams = this.getParams();
oParams.pageSize = this.$refs.glsxTable.pageSize;
oParams.pageSize = this.$refs.glsxTable.pageSizeNum;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
MILEAGE_GETDAILYSEARCH(oParams).then((res) => {
let { data } = res;
......@@ -251,8 +251,8 @@ export default {
rest() {
this.searchForm = {};
this.dateTime = [];
this.getList();
this.$refs.glsxTable.rest();
this.getList();
},
},
};
......
......@@ -10,7 +10,9 @@
<el-tab-pane label="车辆纬度" name="car">
<statistics-car></statistics-car>
</el-tab-pane>
<el-tab-pane label="设备纬度" name="device">设备纬度</el-tab-pane>
<el-tab-pane label="设备纬度" name="device">
<statistics-device></statistics-device>
</el-tab-pane>
</el-tabs>
</div>
......@@ -19,9 +21,11 @@
<script>
import {} from "services/report";
import StatisticsCar from './statistics_car'
import StatisticsDevice from './statistics_device'
export default {
components: {
StatisticsCar
StatisticsCar,
StatisticsDevice
},
data() {
return {
......
......@@ -6,7 +6,7 @@
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="small">
<el-form-item label="关键字:">
<el-input placeholder="设备号|姓名|车架号|业务工单号" class="a_input" maxlength="20" v-model.trim="searchForm.keywords">
<el-input placeholder="业务工单|姓名|车架号|设备号" class="a_input" maxlength="20" v-model.trim="searchForm.term">
</el-input>
</el-form-item>
<el-form-item label="车辆归属:">
......@@ -19,7 +19,17 @@
</el-popover>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getList()">搜索</el-button>
<div class="pre_select_box">
<el-select v-model="searchForm.queryTimeType" class="small_select mr5" placeholder="请选择">
<el-option label="车辆激活时间" :value="1"></el-option>
<el-option label="工单接收时间" :value="2"></el-option>
</el-select>
<el-date-picker v-model="searchForm.timeDate" class="data_picker" value-format="yyyy-MM-dd" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" unlink-panels :picker-options="dataPickerOptions">
</el-date-picker>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="searchEvent()">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-refresh" size="mini" @click="rest()">重置</el-button>
......@@ -36,10 +46,7 @@
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table ref="glsxTable" v-loading="loading" :request="GET_FAKEOFFLINE_LIST" :column="columnList" :pageTotal="pageTotal" @change="getList">
<div slot="operate" slot-scope="{scope}">
<el-link type="primary" :underline="false" @click="lookDetail(scope)" v-if="scope.locationFlag == 1">查看位置</el-link>
</div>
<glsx-table ref="glsxTable" v-loading="loading" :params="tableParams" :request="GET_OPEREPORT_VEHICLE_SEARCH" :column="columnList">
</glsx-table>
<!-- 列表 end -->
</div>
......@@ -50,21 +57,15 @@
<script>
import GlsxTable from "@/components/glsx-table/table";
import {
GET_JOURNEYS_SEARCH,
GET_JOURNEYS_EXPORT,
GET_JOURNEYS_DAILYEXPORT,
GET_FAKEOFFLINE_LIST,
GET_FAKEOFFLINE_EXPORT,
GET_FAKEOFFLINE_TEMPLATEFILES,
IMPORT_FAKEOFFLINE_FILES,
GET_OPEREPORT_VEHICLE_EXPORT,
GET_OPEREPORT_VEHICLE_SEARCH,
} from "services/report";
import GlsxOrganization from "@/components/glsx-organization";
import { deepClone, showToast } from "@/utils/util";
import store from "@/store";
import moment, { max } from "moment";
import GlsxDialog from "@/components/dialog";
import { staticReportCarShortcuts } from "@/common";
export default {
name:'StatisticsCar',
name: "StatisticsCar",
components: {
GlsxTable,
GlsxOrganization,
......@@ -72,108 +73,69 @@ export default {
},
data() {
return {
searchForm: {},
searchForm: { queryTimeType: 1 },
tableData: [],
columnList: [
{ label: "工单号", prop: "bizOrderNo" },
{ label: "业务工单号", prop: "bizOrderNo" },
{ label: "车牌号", prop: "licensePlate" },
{ label: "姓名", prop: "ownerName" },
{ label: "设备号", prop: "sns" },
{ label: "车架号", prop: "vin" },
{ label: "假性离线原因", prop: "reason" },
{ label: "设备号", prop: "sns" },
{ label: "设备组合", prop: "deviceCompose" },
{ label: "工单接收时间", prop: "createdDate" },
{ label: "车辆激活时间", prop: "activateTime" },
{ label: "所属组织", prop: "belongLevels" },
{ label: "车型", prop: "modelName" },
{ label: "激活人", prop: "activator" },
],
pageTotal: 0,
pageSize: 10,
filterVisible: false,
dloading: false,
showPopover: false,
cloading: false,
loading: false,
aloading: false,
isTimeOut: false,
sTime: "",
eTime: "",
pickerOptions: {
onPick: ({ maxDate, minDate }) => {
this.sTime = minDate || "";
this.eTime = maxDate || "";
if (maxDate && minDate) {
let m = moment(maxDate).diff(moment(minDate), "days");
if (m > 60) {
this.isTimeOut = true;
} else {
this.isTimeOut = false;
}
this.eTime = "";
this.sTime = "";
}
},
GET_OPEREPORT_VEHICLE_SEARCH,
tableParams: {},
dataPickerOptions: {
shortcuts: staticReportCarShortcuts,
},
showDialog: false,
uploadFile: {},
showResult: false,
uploadHeaders: {},
uploadResult: {},
IMPORT_FAKEOFFLINE_FILES,
fileList: [],
acceptFile: ".xlsx,.xls",
GET_FAKEOFFLINE_LIST
};
},
mounted() {
let token = localStorage.getItem("token");
this.uploadHeaders = { Authorization: token };
//this.getList();
},
mounted() {},
methods: {
// 获取查询参数
getParams() {
let oParams = deepClone(this.searchForm);
let m = oParams.timeDate;
let startIds = {
1: "activateBeginDate",
2: "orderBeginDate",
};
let endIds = {
1: "activateEndDate",
2: "orderEndDate",
};
if (m && m.length > 0) {
oParams[startIds[oParams.queryTimeType]] = m[0];
oParams[endIds[oParams.queryTimeType]] = m[1];
}
delete oParams.queryTimeType;
delete oParams.timeDate;
delete oParams.orgName;
return oParams;
},
// 获取列表
getList(options) {
let oParams = this.getParams();
console.log(options);
console.log(this.$refs.glsxTable.pageSizeNum);
oParams.pageSize = options
? options.pageSize
: this.$refs.glsxTable.pageSizeNum;
oParams.pageNumber = options ? options.pageNumber || 1 : 1;
this.loading = true;
GET_FAKEOFFLINE_LIST(oParams)
.then((res) => {
this.loading = false;
let { data } = res;
let { list, totalElements } = data;
this.pageTotal = totalElements || 0;
this.tableData = list || [];
})
.catch((error) => {
this.loading = false;
});
},
// 查看详情
lookDetail(row) {
console.log(row);
let o = window.location.origin;
let query = { vin: row.vin };
//let path = "/trialRun#/reportManage/map";
let path = `/oEshield/#/monitor/activeLocation`;
//history.pushState(query, path, path);
this.$root.parentCommon.setBreadCrumbs(path);
window.open(path + "?sns=" + row.sns);
//this.$router.push({ name: "mileageDetail", query: { vin: row.vin } });
// 搜索
searchEvent() {
this.$refs.glsxTable.restParams();
this.tableParams = this.getParams();
},
// 监听树
onChange(e) {
this.filterVisible = false;
console.log(e);
if (e) {
this.orgInfo = e.origin;
this.searchForm.orgId = e.origin.orgId;
......@@ -188,111 +150,21 @@ export default {
let oParams = this.getParams();
_this.dloading = true;
GET_FAKEOFFLINE_EXPORT(oParams).then((res) => {
GET_OPEREPORT_VEHICLE_EXPORT(oParams).then((res) => {
_this.dloading = false;
if (res.code != 200) {
return false;
}
window.open(res.data);
});
// _this.$Common.exportExcel({
// url: `${store.state.baseURL}${MILEAGESTATISTICSEXPORT}`,
// method: "GET",
// data: oParams,
// fileName: "里程统计报表",
// success: () => {
// _this.dloading = false;
// },
// fail: () => {
// _this.dloading = false;
// },
// });
},
// 重置
rest() {
this.searchForm = {};
this.$refs.glsxTable.rest();
this.getList();
},
// 监听文件导入
onFileChange(file, fileList) {
console.log(file);
if (!file.response) {
this.uploadFile = file;
this.fileList = [file];
}
},
// 打开批量导入弹框
openDialog() {
this.showDialog = true;
},
// 关闭弹框
closeDialog() {
this.showDialog = false;
this.uploadFile = {};
this.uploadResult = {};
this.showResult = false;
},
// 上传文件
saveFile() {
let o = this.uploadFile;
console.log(o);
if (!this.uploadFile.name) {
showToast({
message: "请选择上传文件",
});
return false;
}
let list = o.name.split(".");
let acceptFile = this.acceptFile;
let _type = list[list.length - 1];
console.log(_type);
let idx = acceptFile.includes(_type);
if (!idx) {
showToast({
message: `导入文件只支持${acceptFile}`,
});
return false;
}
this.aloading = true;
this.$refs.elUpload.submit();
},
// 监听文件上传成功
onSuccess(response, file, fileList) {
this.aloading = false;
if (response.code != 200) {
showToast({
message: response.message,
});
this.uploadFile = {};
this.$refs.elUpload.clearFiles();
return false;
}
this.uploadResult = response.data;
this.showResult = true;
this.getList();
},
// 下载模板
downloadTemplate() {
GET_FAKEOFFLINE_TEMPLATEFILES().then((res) => {
window.open(res.data);
});
},
// 下载失败模板
downloadFail() {
let o = this.uploadResult;
window.open(o.failFile);
this.$refs.glsxTable.restParams()
this.tableParams = {};
this.searchForm = { queryTimeType: 1 };
//this.$refs.glsxTable.getList();
},
},
};
......
<template>
<div class="system-container">
<div class="container">
<!-- 搜索区域 开始 -->
<div class="search_box">
<el-form :model="searchForm" :inline="true" size="small">
<el-form-item label="关键字:">
<el-input placeholder="业务工单|姓名|车架号|设备号" class="a_input" maxlength="20" v-model.trim="searchForm.term">
</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>
</el-input>
</el-popover>
</el-form-item>
<el-form-item>
<div class="pre_select_box">
<el-select v-model="searchForm.queryTimeType" class="small_select mr5" placeholder="请选择">
<el-option label="设备激活时间" :value="1"></el-option>
<el-option label="定位时间" :value="2"></el-option>
</el-select>
<el-date-picker v-model="searchForm.timeDate" class="data_picker" value-format="yyyy-MM-dd" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" unlink-panels :picker-options="dataPickerOptions">
</el-date-picker>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="searchEvent()">搜索</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-refresh" size="mini" @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="mini" :loading="dloading" @click="downloadExcel">导出Excel</el-button>
</div>
<!-- 按钮区域 end -->
<!-- 列表 开始 -->
<glsx-table ref="glsxTable" v-loading="loading" :params="tableParams" :request="GET_OPEREPORT_DEVICE_SEARCH" :column="columnList">
</glsx-table>
<!-- 列表 end -->
</div>
</div>
</template>
<script>
import GlsxTable from "@/components/glsx-table/table";
import {
GET_OPEREPORT_DEVICE_SEARCH,
GET_OPEREPORT_DEVICE_EXPORT,
} from "services/report";
import GlsxOrganization from "@/components/glsx-organization";
import { deepClone, showToast } from "@/utils/util";
import GlsxDialog from "@/components/dialog";
import {staticReportCarShortcuts} from '@/common'
export default {
name: "StatisticsDevice",
components: {
GlsxTable,
GlsxOrganization,
GlsxDialog,
},
data() {
return {
searchForm: { queryTimeType: 1 },
tableData: [],
columnList: [
{ label: "业务工单号", prop: "bizOrderNo" },
{ label: "设备号", prop: "sns" },
{ label: "车牌号", prop: "licensePlate" },
{ label: "姓名", prop: "ownerName" },
{ label: "车架号", prop: "vin" },
{ label: "所属组织", prop: "belongLevels" },
{ label: "设备激活时间", prop: "activateTime" },
{ label: "定位时间", prop: "gpsTime" },
{ label: "定位地点", prop: "gpsAddress" },
{ label: "工单激活时间", prop: "woActivateTime" },
],
pageTotal: 0,
pageSize: 10,
filterVisible: false,
dloading: false,
showPopover: false,
loading: false,
GET_OPEREPORT_DEVICE_SEARCH,
tableParams: {},
dataPickerOptions:{
shortcuts: staticReportCarShortcuts,
}
};
},
mounted() {},
methods: {
// 获取查询参数
getParams() {
let oParams = deepClone(this.searchForm);
let m = oParams.timeDate;
let startIds = {
1: "activateBeginDate",
2: "gpsBeginDate",
};
let endIds = {
1: "activateEndDate",
2: "gpsEndDate",
};
if (m && m.length > 0) {
oParams[startIds[oParams.queryTimeType]] = m[0];
oParams[endIds[oParams.queryTimeType]] = m[1];
}
delete oParams.queryTimeType;
delete oParams.timeDate;
delete oParams.orgName;
return oParams;
},
// 搜索
searchEvent() {
this.$refs.glsxTable.restParams();
this.tableParams = this.getParams();
},
// 监听树
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;
}
},
// 导出excel
downloadExcel() {
let _this = this;
let oParams = this.getParams();
_this.dloading = true;
GET_OPEREPORT_DEVICE_EXPORT(oParams).then((res) => {
_this.dloading = false;
if (res.code != 200) {
return false;
}
window.open(res.data);
});
},
// 重置
rest() {
this.$refs.glsxTable.restParams()
this.tableParams = {};
this.searchForm = {queryTimeType: 1 };
//this.$refs.glsxTable.rest();
},
},
};
</script>
<style lang="scss" scoped>
@import "@/styles/offline.scss";
</style>>
\ No newline at end of file
......@@ -69,7 +69,11 @@
<el-form-item label="车型/车系:" prop="carIds" class="long_form_item">
<el-cascader v-model="snForm.carIds" :options="vehicleList" :props="vehicleProps" class="el_cascader"></el-cascader>
</el-form-item>
<el-form-item label="排量:" class="long_form_item">
<el-form-item label="是否结清:">
<el-switch v-model="snForm.value1" active-text="已结清" inactive-text="未结清">
</el-switch>
</el-form-item>
<el-form-item label="排量:">
<el-input v-model="snForm.displacement" maxlength="50" clearable></el-input>
</el-form-item>
<el-form-item label="车辆标签:" prop="vehicleType">
......
......@@ -53,8 +53,14 @@
<el-option v-for="(item,index) in VEHICLE_ONLINE_STATUS" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否结清:">
<el-select v-model="searchForm.settleFlag" class="small_select">
<el-option label="全部" value=""></el-option>
<el-option v-for="(item,index) in SETTLE_FLAG_LIST" :key="index" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :size="btn_size" icon="el-icon-search" @click="getList()">搜索</el-button>
<el-button type="primary" :size="btn_size" icon="el-icon-search" @click="searchEvent()">搜索</el-button>
<el-button type="primary" :size="btn_size" icon="el-icon-refresh" @click="refresh">重置</el-button>
</el-form-item>
</el-form>
......@@ -95,6 +101,14 @@
<el-table-column label="设备类型" prop="deviceTypeStr" show-overflow-tooltip>
<template slot-scope="{row}">{{row.deviceTypeStr||'--'}}</template>
</el-table-column>
<el-table-column label="激活时间" prop="activateTime" show-overflow-tooltip></el-table-column>
<el-table-column label="设备状态" prop="deviceStateStr" show-overflow-tooltip>
<template slot-scope="{row}">{{row.deviceStateStr||'--'}}</template>
</el-table-column>
<el-table-column label="特殊状态" prop="specialState" show-overflow-tooltip></el-table-column>
<el-table-column label="是否结清" prop="settleFlag" show-overflow-tooltip>
<template slot-scope="{row}">{{row.settleFlag||'--'}}</template>
</el-table-column>
<el-table-column label="车型" prop="modelName" show-overflow-tooltip>
<template slot-scope="{row}">{{row.modelName||'--'}}</template>
</el-table-column>
......@@ -104,11 +118,6 @@
<el-table-column label="车辆用途" prop="vehicleUsageStr" show-overflow-tooltip>
<template slot-scope="{row}">{{row.vehicleUsageStr||'--'}}</template>
</el-table-column>
<el-table-column label="激活时间" prop="activateTime" show-overflow-tooltip></el-table-column>
<el-table-column label="设备状态" prop="deviceStateStr" show-overflow-tooltip>
<template slot-scope="{row}">{{row.deviceStateStr||'--'}}</template>
</el-table-column>
<el-table-column label="特殊状态" prop="specialState" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" prop="vehicleUsageStr" width="170">
<template slot-scope="{row}">
<template v-if="row.permitType == 'r'">
......@@ -208,9 +217,16 @@
<el-form-item label="发动机号:" prop="engine" class="long_form_item">
<el-input v-model="snForm.engine" maxlength="50" clearable></el-input>
</el-form-item>
<el-form-item label="车辆归属:" prop="organizationName" class="long_form_item">
<el-form-item label="车辆归属:" prop="organizationName">
<el-input v-model="snForm.organizationName" readonly @click.native="selectStore"></el-input>
</el-form-item>
<el-form-item label="是否结清:" v-if="hasPermission('vehicle_vin_settle')">
<div class="el_switch_box">
<el-switch v-model="snForm.settleFlag" :active-value="1" :inactive-value="0">
</el-switch>
<span class="tips">{{snForm.settleFlag?'已结清':'未结清'}}</span>
</div>
</el-form-item>
<el-form-item label="车型/车系:" prop="carIds" class="long_form_item">
<el-cascader v-model="snForm.carIds" :options="vehicleList" :props="vehicleProps" class="el_cascader"></el-cascader>
</el-form-item>
......@@ -370,7 +386,7 @@ import { getOrgTree } from "services/common";
import AuthButton from "@/components/auth-button";
import moment from "moment";
import GlsxOrganization from "@/components/glsx-organization";
import { VEHICLE_USE_LIST, VEHICLE_TAG_LIST } from "@/common/constants";
import { VEHICLE_USE_LIST, VEHICLE_TAG_LIST,SETTLEFLAGLIST,SETTLE_FLAG_LIST } from "@/common/constants";
export default {
components: {
freqModal,
......@@ -423,7 +439,7 @@ export default {
return {
VEHICLE_USE_LIST,
VEHICLE_TAG_LIST,
searchForm: {},
searchForm: {settleFlag:''},
getListApi: getVehicleList,
authList: [
......@@ -810,6 +826,8 @@ export default {
],
VEHICLE_ONLINE_STATUS,
ajaxLoading: false,
settleFlagList:SETTLEFLAGLIST,
SETTLE_FLAG_LIST
};
},
......@@ -826,7 +844,6 @@ export default {
this.getModels();
resolve();
});
},
mounted() {
let _this = this;
......@@ -863,7 +880,7 @@ export default {
refresh() {
this.pageSize = 10;
this.pageNumber = 1;
this.searchForm = {};
this.searchForm = {settleFlag:''};
this.getList();
},
......@@ -905,7 +922,7 @@ export default {
//this.snForm.deviceArr = [{ sn: "", deviceType: "" }];
//this.snForm.deviceInfoDtos = [{}];
this.snForm = {};
this.snForm = {settleFlag:0};
this.$set(this.snForm, "deviceInfoDtos", [
{ sn: "", deviceClassifyName: "" },
]);
......@@ -1056,10 +1073,13 @@ export default {
}
break;
case "export":
let oParams = this.getParams();
delete oParams.pageSize
delete oParams.pageNumber
this.$Common.exportExcel({
url: `${store.state.baseURL}/trialdrive/vehicle/vehicleinfo/export`,
method: "GET",
data: this.searchForm,
data: oParams,
fileName: "车辆列表" + moment().format("YYYY.MM.DD") + ".xls",
});
break;
......@@ -1694,6 +1714,19 @@ export default {
row.disabled = !row.disabled;
this.$set(this.snForm.deviceInfoDtos, index, row);
},
// 是否有权限
hasPermission(id){
return this.$hasPermission(id)
},
// 搜索
searchEvent(){
this.pageNumber = 1;
this.getList()
}
},
};
</script>
......@@ -1827,4 +1860,13 @@ export default {
border-color: #c6e2ff;
background: #ecf5ff;
}
.el_switch_box{
display:flex;
align-items: center;
.tips{
font-size:12px;
color:#333;
margin-left:10px;
}
}
</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!