Commit 68b76f54 by 前端

Merge branch 'v1.23.0' into 'master'

V1.23.0版本需求已上线,合并代码到master

See merge request !66
2 parents c4464ad0 8c8946c1
......@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@babel/code-frame": {
"version": "7.10.4",
"resolved": "https://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.10.4.tgz?cache=0&sync_timestamp=1593522948158&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.10.4.tgz",
......@@ -1730,16 +1735,6 @@
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": {
"version": "13.0.1",
"resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1594429684526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
......@@ -1766,34 +1761,6 @@
"unique-filename": "^1.1.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"find-cache-dir": {
"version": "3.3.1",
"resolved": "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-3.3.1.tgz",
......@@ -1815,25 +1782,6 @@
"path-exists": "^4.0.0"
}
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-5.0.0.tgz",
......@@ -1898,16 +1846,6 @@
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": {
"version": "2.3.8",
"resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1602701885709&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
......@@ -1924,18 +1862,6 @@
"terser": "^4.6.12",
"webpack-sources": "^1.4.3"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -11267,6 +11193,87 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": {
"version": "3.4.6",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.6.tgz",
......
......@@ -10,6 +10,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"axios": "^0.20.0",
"clipboard": "^2.0.4",
"core-js": "^3.6.5",
......
......@@ -26,16 +26,23 @@
<div id="mapContainer" class="map-container"></div>
<fence-map-controll @onRefreshMap="refreshMap" :isModalMap="true"></fence-map-controll>
<fence-map-controll
@onRefreshMap="refreshMap"
:isModalMap="true"
></fence-map-controll>
<div class="map-seacrh-wrap">
<!-- <input type="text" id="fenceMapSearch"> -->
<el-input placeholder="请输入位置" id="fenceMapSearch" size="small" v-model="fenceMapSearch">
<el-input
placeholder="请输入位置"
id="fenceMapSearch"
size="small"
v-model="fenceMapSearch"
>
<template slot="prepend">搜索</template>
<!-- <el-button slot="append" icon="el-icon-search" @click="search"></el-button> -->
</el-input>
</div>
</div>
<!-- <div slot="footer" class="dialog-footer">
......@@ -51,6 +58,7 @@ import remoteLoad from "@/utils/remoteLoad.js";
import mapService from "@/utils/mapService.js";
import FenceMapControll from "./fenceMapControll";
import Constants from "@/utils/constants";
import { mapInit } from "@/utils/mapInit";
export default {
props: ["init"],
......@@ -114,12 +122,10 @@ export default {
} */
},
async created() {
if (window.AMap) {
this.initMap();
} else {
await remoteLoad(`${Constants.AMAP_URL}`, true);
this.initMap();
}
let _this = this;
mapInit().then((AMap) => {
_this.initMap();
});
},
methods: {
initMap() {
......@@ -270,7 +276,7 @@ export default {
});
});
//this.circleEditor.open();
this.circleEditor.close();
this.circleEditor.close();
});
}
......
import request from "@/services/request";
// POI管理-获取poi列表
export const GET_POI_LIST = (params) => {
return request(params, "/trialdrive/poifence/search");
};
// POI管理-导出poi列表
export const EXPORT_POI_INFO = (params) => {
return request(params, "/trialdrive/poifence/export");
};
// POI管理-删除poi信息
export const DELETE_POI_INFO = (params) => {
return request(params, "/trialdrive/poifence/delete");
};
// POI管理-更新poi状态
export const MODIFY_POI_INFO = (params) => {
return request(params, "/trialdrive/poifence/modify");
};
......@@ -158,6 +158,17 @@ export const GET_OPEREPORT_VEHICLE_EXPORT = params => {
return request(params, '/trialdrive/opereport/vehicle/export')
}
// 报表管理-运营报表统计-信息解析之SN导入模板下载
export const GET_SN_TEMPLATEFILE = "https://img01.glsx.com.cn/weapp/resource/e-shield/信息解析之SN导入模板.xls";
// 报表管理-运营报表统计-信息解析之车架号导入模板 下载
export const GET_VIN_TEMPLATEFILE = "https://img01.glsx.com.cn/weapp/resource/e-shield/信息解析之车架号导入模板.xls";
// 报表管理-运营报表统计-信息解析之工单号导入模板 下载
export const GET_WORKORDER_TEMPLATEFILE = "https://img01.glsx.com.cn/weapp/resource/e-shield/信息解析之工单号导入模板.xls";
// 报表管理-运营报表统计-信息解析导入模板
export const IMPORT_OPEREPORT_EXCEL_INFO = BASEURL + '/trialdrive/opereport/import'
export { getList, getYears, getOutStoreList }
const MAP_KEY = '75116f653f3b2e4568116dad8cd9b899'
const Constants = {
AMAP_URL: `https://webapi.amap.com/maps?v=1.4.2&key=${MAP_KEY}&plugin=AMap.PolyEditor,AMap.CircleEditor,AMap.DistrictSearch,AMap.Autocomplete,AMap.MarkerClusterer,AMap.MouseTool,AMap.Text`,
// 处理状态
DEAL_STATUS: {
'0': '未处理',
......
File mode changed
import AMapLoader from "@amap/amap-jsapi-loader";
export const MAP_KEY = "75116f653f3b2e4568116dad8cd9b899";
export const MAP_SERVICE_KEY = "d22348363c34c266f772ae9b635eef2a";
// 地图插件
export const MAP_PLUGINS = [
"AMap.PolyEditor",
"AMap.CircleEditor",
"AMap.DistrictSearch",
"AMap.Autocomplete",
"AMap.MarkerClusterer",
"AMap.MouseTool",
"AMap.Text",
"AMap.RangingTool",
"AMap.Geolocation",
"AMap.PolygonEditor",
"AMap.PolylineEditor",
"AMap.Scale",
];
// 加载地图
export const mapInit = (params) => {
return new Promise((resolve, reject) => {
let plugins = params.plugins || MAP_PLUGINS;
let version = params.version || "2.0";
if(window.AMap){
resolve(window.AMap)
return false;
}
AMapLoader.reset();
AMapLoader.load({
key: MAP_KEY, // 申请好的Web端开发者Key,首次调用 load 时必填
version: version, // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins: plugins, // 需要使用的的插件列表,如比例尺'AMap.Scale'等
})
.then((AMap) => {
window.AMap = AMap;
resolve(AMap);
})
.catch((error) => {
console.log(error);
reject(error);
});
});
};
<template>
<div>
<glsx-dialog :show="showDialog" :title="!showResult?'批量操作':'提示'" width="560px" @close="closeDialog()">
<glsx-dialog
:show="showDialog"
:title="!showResult ? '信息解析' : '提示'"
width="560px"
@close="closeDialog()"
>
<div>
<div class="upload_box" v-show="!showResult">
<div class="input_box">
<el-input v-model="uploadFile.name" placeholder="未选择任何文件..." class="a_input" size="small" readonly></el-input>
<el-upload ref="elUpload" :action="IMPORT_FAKEOFFLINE_FILES" :headers="uploadHeaders" :accept="acceptFile" :show-file-list="false" :auto-upload="false" :file-list="fileList" :on-change="onFileChange" :on-success="onSuccess">
<el-input
v-model="uploadFile.name"
placeholder="未选择任何文件..."
class="a_input"
size="small"
readonly
></el-input>
<el-upload
ref="elUpload"
:action="IMPORT_OPEREPORT_EXCEL_INFO"
:headers="uploadHeaders"
:accept="acceptFile"
:show-file-list="false"
:auto-upload="false"
:file-list="fileList"
:on-change="onFileChange"
:on-success="onSuccess"
>
<el-button size="small" type="primary">浏览</el-button>
</el-upload>
</div>
<div class="tips">*请选择需要导入的条件模板*</div>
<div>
<el-button type="primary" size="small" v-if="!showResult" @click="downloadTemplate()">SN号导入模板</el-button>
<el-button type="primary" size="small" v-if="!showResult" @click="downloadTemplate()">工单号导入模板</el-button>
<el-button type="primary" size="small" v-if="!showResult" @click="downloadTemplate()">车架号导入模板</el-button>
<el-button
type="primary"
size="small"
v-if="!showResult"
@click="downloadTemplate('sn')"
>SN号导入模板</el-button
>
<el-button
type="primary"
size="small"
v-if="!showResult"
@click="downloadTemplate('vin')"
>工单号导入模板</el-button
>
<el-button
type="primary"
size="small"
v-if="!showResult"
@click="downloadTemplate('order')"
>车架号导入模板</el-button
>
</div>
</div>
<div class="upload_result" v-show="showResult && !exportDialog">
<div class="cell">
<span class="num">{{uploadResult.succNum}}</span>
<!-- <div class="cell">
<span class="num">{{ uploadResult.succNum }}</span>
<span>成功记录</span>
</div>
<div class="cell">
<span class="num cred">{{uploadResult.failNum}}</span>
<span class="num cred">{{ uploadResult.failNum }}</span>
<span>失败记录</span>
</div>
</div>
<div class="upload_result" v-show="exportDialog">
<el-alert
type="warning"
description="请等待解析结果,解析完成后将自动为您下载,请勿关闭当前浏览器!"
:closable="false"
show-icon>
</el-alert>
</div> -->
<el-alert
type="warning"
description="请等待解析结果,解析完成后将自动为您下载,请勿关闭当前浏览器!"
:closable="false"
show-icon
>
</el-alert>
</div>
<!-- <div class="upload_result" v-show="exportDialog">
<el-alert
type="warning"
description="请等待解析结果,解析完成后将自动为您下载,请勿关闭当前浏览器!"
:closable="false"
show-icon
>
</el-alert>
</div> -->
</div>
<div slot="footer">
<div class="dialog_links">
<div></div>
<div>
<el-button type="primary" size="small" v-if="showResult && uploadResult.failFile" @click="downloadFail()">导出失败记录</el-button>
</div>
<div>
<el-button type="primary" size="small" :loading="aloading" :disabled="!uploadFile.name" v-if="!showResult" @click="saveFile()">确认</el-button>
<el-button type="default" size="small" @click="closeDialog()" v-if="!exportDialog">{{!showResult?'取消':'关闭'}}</el-button>
<el-button type="default" size="small" @click="closeDialog()" v-if="exportDialog"><i class="el-icon-loading" v-show="exportDialog"></i>完成</el-button>
<el-button
type="primary"
size="small"
:loading="aloading"
:disabled="!uploadFile.name"
v-if="!showResult"
@click="saveFile()"
>确认</el-button
>
<el-button
type="default"
size="small"
@click="closeDialog()"
v-if="!exportDialog"
>{{ !showResult ? "取消" : "关闭" }}</el-button
>
<!-- <el-button
type="default"
size="small"
@click="closeDialog()"
v-if="exportDialog"
><i class="el-icon-loading" v-show="exportDialog"></i
>完成</el-button
> -->
</div>
</div>
</div>
......@@ -52,36 +118,44 @@
</template>
<script>
import { IMPORT_FAKEOFFLINE_FILES } from "services/report";
import {
IMPORT_FAKEOFFLINE_FILES,
GET_SN_TEMPLATEFILE,
GET_VIN_TEMPLATEFILE,
GET_WORKORDER_TEMPLATEFILE,
IMPORT_OPEREPORT_EXCEL_INFO,
} from "services/report";
import GlsxDialog from "@/components/dialog";
import { showToast } from "@/utils/util";
export default {
name:"informationDialog",
name: "informationDialog",
components: {
GlsxDialog
},
data() {
return {
showDialog: false,
showResult: false,
uploadFile: {},
IMPORT_FAKEOFFLINE_FILES,
acceptFile: ".xlsx,.xls",
fileList: [],
uploadResult: {},
aloading: false,
}
},
props: {
uploadHeaders: Object,
// 导出按钮互动参数
exportDialog: {
type: Boolean,
default: false
}
},
methods: {
GlsxDialog,
},
data() {
return {
showDialog: false,
showResult: false,
uploadFile: {},
IMPORT_FAKEOFFLINE_FILES,
IMPORT_OPEREPORT_EXCEL_INFO,
acceptFile: ".xlsx,.xls",
fileList: [],
uploadResult: {},
aloading: false,
};
},
props: {
uploadHeaders: Object,
// 导出按钮互动参数
exportDialog: {
type: Boolean,
default: false,
},
},
methods: {
openDialog() {
this.showDialog = true
this.showDialog = true;
},
// 监听文件导入
onFileChange(file, fileList) {
......@@ -93,6 +167,7 @@ export default {
},
// 监听文件上传成功
onSuccess(response, file, fileList) {
let _this = this;
this.aloading = false;
if (response.code != 200) {
showToast({
......@@ -102,10 +177,14 @@ export default {
this.$refs.elUpload.clearFiles();
return false;
}
window.open(response.data);
this.uploadResult = response.data;
this.showResult = true;
// this.getList(); 刷新表格
this.$emit("successData", true)
// this.getList(); 刷新表格
this.$emit("successData", true);
setTimeout(function(){
_this.closeDialog();
},1500)
},
// 确认上传文件
saveFile() {
......@@ -145,8 +224,18 @@ export default {
this.uploadResult = {};
this.showResult = false;
},
}
}
// 下载模板
downloadTemplate(id) {
let list = {
sn: GET_SN_TEMPLATEFILE,
vin: GET_VIN_TEMPLATEFILE,
order: GET_WORKORDER_TEMPLATEFILE,
};
window.open(list[id]);
},
},
};
</script>
<style lang="scss" scoped>
......
......@@ -4,7 +4,7 @@
<div class="page_head_title">
<h2 class="h2">运营统计报表</h2>
<h3 class="h3">通过车辆或设备纬度,统计系统内设备数据,并支持宽表输出</h3>
<!-- <el-button class="informationBtn" type="primary" size="mini" @click="informationClick">信息解析</el-button> -->
<el-button class="informationBtn" type="primary" size="mini" @click="informationClick">信息解析</el-button>
</div>
<el-tabs v-model="tabActive">
......
......@@ -151,6 +151,7 @@ export default {
prop: "vin",
width: 150,
},
{
label: "车系",
prop: "seriesName",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!