Commit 8108a00a by 前端

Merge branch 'v1.17.0' into 'develop'

V1.17.0已上线,合并代码到develop

See merge request !31
2 parents 39bd917e 2a21230b
This diff could not be displayed because it is too large.
...@@ -3,12 +3,15 @@ import HTTP from '../config' ...@@ -3,12 +3,15 @@ import HTTP from '../config'
const axiosHttp = new HTTP() const axiosHttp = new HTTP()
function request (data = {} , url, method = 'GET') { function request (data = {} , url, method = 'GET') {
console.log('开始请求:',new Date().getTime())
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var reqMethod = method.toLocaleLowerCase() === 'get' ? 'axiosGet' : 'axiosPost' var reqMethod = method.toLocaleLowerCase() === 'get' ? 'axiosGet' : 'axiosPost'
axiosHttp[reqMethod]({ axiosHttp[reqMethod]({
url: url, url: url,
data: data, data: data,
success(data) { success(data) {
console.log(data)
console.log('结束请求:',new Date().getTime())
resolve(data) resolve(data)
}, },
error(error) { error(error) {
......
import request from './request'
// 区域查车-查询车辆信息
export const GER_REGIONAL_SEARCH = function(params = {}){
return request(params, '/trialdrive/regional/search', 'get')
}
// 区域查车-导出excel
export const GER_REGIONAL_EXPORT = function(params = {}){
return request(params, '/trialdrive/regional/export', 'get')
}
// 区域查车-查询设备定位信息
export const GER_REGIONAL_LOCATION = function(params = {}){
return request(params, '/trialdrive/regional/location', 'get')
}
\ No newline at end of file \ No newline at end of file

19.4 KB | W: | H:

515 Bytes | W: | H:

src/assets/images/icon_car.png
src/assets/images/icon_car.png
src/assets/images/icon_car.png
src/assets/images/icon_car.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -393,6 +393,7 @@ ...@@ -393,6 +393,7 @@
.des { .des {
flex: 1; flex: 1;
word-break: break-all; word-break: break-all;
max-width: 160px;
} }
.icon { .icon {
......
.row_box_hide {
position: absolute;
top: 20px;
right: 20px;
z-index: 999;
width: 88px;
height: 88px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
.img_hover{
display:none;
}
}
.row_box_hide:hover{
.img_normal{
display:none;
}
.img_hover{
display:block;
}
}
.row_box {
position: absolute;
top: 10px;
right: 10px;
width: 380px;
height: 396px;
background: #ffffff;
border-radius: 8px;
z-index: 999;
padding: 20px;
box-sizing: border-box;
.hide_icon {
position: absolute;
width: 24px;
height: 24px;
right: 20px;
top: 20px;
cursor: pointer;
z-index: 1000;
.img {
width: 100%;
height: 100%;
}
}
.row_head {
position: relative;
display: flex;
align-items: center;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 16px;
color: #666666;
.cell {
position: relative;
padding: 8px 0;
cursor: pointer;
margin-right: 30px;
}
.cell:last-child {
margin-right: 0;
}
.active {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 20px;
color: #333333;
}
.active:after {
display: block;
content: "";
height: 3px;
background: #2196F3;
border-radius: 2px;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
}
.row_content {
padding-top: 15px;
.el_form {
/deep/ .el-form-item {
margin-bottom: 15px;
.el-form-item__label {
line-height: 14px;
padding: 0;
margin-bottom: 10px;
}
.el_select {
width: 100%;
}
}
.device_item{
display:flex;
align-items: center;
/deep/ .el-input__inner{
border-radius:4px 0 0 4px;
}
.btn{
border-radius:0 4px 4px 0;
}
}
.area_btn {
width: 88px;
height: 36px;
background: #E8E8E8;
border-radius: 4px;
padding: 0;
}
.clear_link {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 16px;
color: #185EFE;
margin-left: 20px;
cursor: pointer;
}
.tips_info {
color: #666666ff;
font-size: 16px;
font-weight: 400;
margin: 15px 0;
i {
color: #ee3040ff;
font-style: normal;
}
span{
margin-right:40px;
}
span:last-child{
margin-right:0;
}
}
.btn_group {
.search_btn {
width: 100%;
height: 40px;
}
}
}
}
}
.bottom_list {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: #fff;
//height: 313px;
z-index: 999;
display: flex;
flex-direction: column;
.head {
flex-shrink: 0;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 11px 15px;
.left {
font-weight: 400;
font-size: 16px;
color: #333333;
.cred {
color: #EE3040;
}
.btn {
width: 88px;
height: 32px;
background: #9999991a;
border: 1px solid #CCCCCC;
border-radius: 4px;
padding: 0;
box-sizing: border-box;
font-weight: 500;
font-size: 16px;
color: #666666;
// line-height: 32px;
cursor: pointer;
}
.btn:hover {
background: #2196f31a;
color: #2196F3;
border-color: #2196F3;
}
}
.right {
display: flex;
align-items: center;
.link {
width: 48px;
height: 24px;
text-align: center;
line-height: 24px;
font-weight: 400;
font-size: 16px;
color: #999999;
text-decoration: none;
}
.link:hover {
background: #2196f31a;
border-radius: 2px;
color: #2196F3;
}
}
}
.head:after {
position: absolute;
display: block;
content: "";
height: 1px;
background: #D2D2D2;
left: 0;
right: 0;
bottom: 0;
}
.content {
flex: 1;
overflow-y: auto;
}
}
.bottom_list_hide {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 80px;
height: 24px;
border-radius: 4px 4px 0px 0px;
background: #fff;
z-index: 999;
right: 0;
bottom: 0;
cursor: pointer;
box-shadow: 0 -2px 10px 0 #0000001a;
i {
margin-right: 4px;
}
span {
font-weight: 400;
font-size: 14px;
color: #666666;
}
}
.bottom_list_hide:hover {
background: #185efe33;
i,
span {
color: #185EFE;
}
}
.device_label{
display:flex;
align-items: center;
.img{
width:16px;
height: 16px;
margin-left:4px;
}
}
.draw_area{
margin-top:10px;
}
\ No newline at end of file \ No newline at end of file
export const Validator = {
/*手机号码格式校验正则*/
PHONEREG: /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/,
/*同时包含字母和数字*/
ISNUMANDLETTERS: /^[a-zA-Z0-9]+$/,
/*特殊字符正则*/
SPECIALLETTER:new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"),
/*邮箱地址格式正则*/
//EMAILREG:/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
EMAILREG:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
/*判断是否为中文*/
ISCHINESE:/^[\u0391-\uFFE5]+$/,
/*判断是否为英文字母*/
ISENGLISH:/^[a-zA-Z]+$/,
/*是否包含空格*/
ISHAVENULL:/^[^\s]*$/,
/*保留两位小数*/
TWODECIMAL: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
/*判断是否为正整数*/
ISDECIMAL:/^[0-9]*$/,
// 只能输入负数
ISNEGATIVENUMBER:/^-[0-9]+.?[0-9]*/,
/**
* 账号管理-手机号码校验
*/
checkPhoneNumber:function(str){
return Validator.PHONEREG.test(str);
}
};
// 校验手机号码格式
export const PHONE_VALIDATOR = (rule, value, callback) => {
let reg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
if (!reg.test(value)) {
return callback(new Error('手机号格式不正确'));
}
callback()
}
// 校验是否为数字
export const CHECK_NUMBER = function(rule, value, callback){
let reg = /^[0-9]*$/
console.log(reg.test(value))
if (!reg.test(value)) {
return callback(new Error('请输入纯数字'));
}
callback()
}
// 校验值的大小
export const CHECK_MAX_MIN = function(rule, value, callback){
if (value>5 || value<1) {
return callback(new Error('总体评分最小1,最大5'));
}
callback()
}
...@@ -37,8 +37,9 @@ export default { ...@@ -37,8 +37,9 @@ export default {
watch: { watch: {
// value: { // value: {
// handler: function (n, o) { // handler: function (n, o) {
// console.log(n)
// if (n) { // if (n) {
// this.init(); // //this.init();
// } // }
// }, // },
// immediate: true, // immediate: true,
...@@ -47,10 +48,10 @@ export default { ...@@ -47,10 +48,10 @@ export default {
created() { created() {
// 查询 // 查询
// console.log(store); // console.log(store);
let list = store.state.common.provinceList; // let list = store.state.common.provinceList;
if (!list || list.length <= 0) { // if (!list || list.length <= 0) {
this.getList(); // this.getList();
} // }
}, },
mounted() { mounted() {
//this.city = this.value; //this.city = this.value;
...@@ -61,17 +62,17 @@ export default { ...@@ -61,17 +62,17 @@ export default {
console.log(e); console.log(e);
let list = this.cityList; let list = this.cityList;
let nameList = []; let nameList = [];
let id = 'fullname';
let m = list.find((k) => k.code == e[0]); let m = list.find((k) => k.code == e[0]);
console.log(m); nameList.push(m[id]);
nameList.push(m.name);
let n = m.children.find((k) => k.code == e[1]); let n = m.children.find((k) => k.code == e[1]);
let b = ((n && n.children) || []).find((k) => k.code == e[2]); let b = ((n && n.children) || []).find((k) => k.code == e[2]);
if (n) { if (n) {
this.$emit("input", n.name); this.$emit("input", n[id]);
nameList.push(n.name); nameList.push(n[id]);
} }
if (b) { if (b) {
nameList.push(b.name); nameList.push(b[id]);
} }
this.$emit("change", { code: e, name: nameList }); this.$emit("change", { code: e, name: nameList });
}, },
...@@ -143,25 +144,30 @@ export default { ...@@ -143,25 +144,30 @@ export default {
return afterArray; return afterArray;
}, },
// 重置
reset(){
this.city = []
}
// 查询高德地图的省市区 // 查询高德地图的省市区
getList() { // getList() {
let oParams = {}; // let oParams = {};
oParams.key = CONSTANT.MAP_SERVICE_KEY; // oParams.key = CONSTANT.MAP_SERVICE_KEY;
oParams.subdistrict = 3; // oParams.subdistrict = 3;
oParams.keywords = "中国"; // oParams.keywords = "中国";
axios({ // axios({
url: "https://restapi.amap.com/v3/config/district", // url: "https://restapi.amap.com/v3/config/district",
params: oParams, // params: oParams,
}).then((res) => { // }).then((res) => {
console.log(res); // console.log(res);
let obj = res.data; // let obj = res.data;
let { districts } = obj; // let { districts } = obj;
let list = districts[0] ? districts[0].districts : []; // let list = districts[0] ? districts[0].districts : [];
console.log(list); // console.log(list);
this.cityList = list; // this.cityList = list;
store.commit('SET_AMAP_PROVINCE',list) // store.commit('SET_AMAP_PROVINCE',list)
}); // });
}, // },
}, },
}; };
</script> </script>
......
<template>
<el-image
:src="imgPath"
:fit="fit"
class="img"
>
<div slot="error" class="image_slot">
<i class="el-icon-user"></i>
</div>
</el-image>
</template>
<script>
export default {
name: "GlsxImage",
props: {
src: {
type: String,
default: "",
},
fit: {
type: String,
default: "",
},
},
watch: {
src: {
handler: function (n) {
if (n) {
console.log(n);
this.imgPath = this.IMAGEURL + n;
}
},
immediate: true,
},
},
data() {
return {
imgPath: "",
IMAGEURL: 'https://img01.glsx.com.cn/weapp/resource/e-shield/',
};
},
created() {
console.log(this.src);
},
mounted() {},
methods: {
},
};
</script>
<style lang="scss" scoped>
.img {
cursor: pointer;
width: 100%;
height: 100%;
}
</style>
<style lang="scss">
.image_slot{
width: 100%;
height: 100%;
display:flex;
flex-direction: column;
align-items: center;
justify-content: center;
background:#f5f7fa;
i{
font-size:24px;
color:#909399;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -32,6 +32,14 @@ import 'vxe-table/lib/style.css' ...@@ -32,6 +32,14 @@ import 'vxe-table/lib/style.css'
Vue.use(VXETable) Vue.use(VXETable)
// // worker多线程
// import VueWorker from 'vue-worker'
// Vue.use(VueWorker)
// 引入 公共图片组件
import GlsxImage from '@/components/glsx-image/index.vue';
Vue.component('GlsxImage', GlsxImage)
// new Vue({ // new Vue({
// el: '#app', // el: '#app',
// router, // router,
......
...@@ -61,6 +61,8 @@ const stockDeviceList = () => import(/* webpackChunkName: "stockDeviceList" */ ' ...@@ -61,6 +61,8 @@ const stockDeviceList = () => import(/* webpackChunkName: "stockDeviceList" */ '
const anjiAccount = () => import(/* webpackChunkName: "anjiAccount" */ 'pages/business/anjiAccount.vue'); const anjiAccount = () => import(/* webpackChunkName: "anjiAccount" */ 'pages/business/anjiAccount.vue');
const tool = () => import(/* webpackChunkName: "tool" */ 'pages/tool/index.vue'); const tool = () => import(/* webpackChunkName: "tool" */ 'pages/tool/index.vue');
const zoneCar = () => import(/* webpackChunkName: "zoneCar" */ 'pages/monitor/zoneCar.vue')
const routes = [ const routes = [
/* { /* {
path: '*', path: '*',
...@@ -203,6 +205,12 @@ const routes = [ ...@@ -203,6 +205,12 @@ const routes = [
component: monitor component: monitor
}, },
{ {
path: 'zoneCar',
name: 'zoneCar',
meta: { title: '区域查车' },
component: zoneCar
},
{
path: 'historyLocation', path: 'historyLocation',
name: 'historyLocation', name: 'historyLocation',
meta: { title: '历史停留' }, meta: { title: '历史停留' },
......
...@@ -20,11 +20,15 @@ function MapService() { ...@@ -20,11 +20,15 @@ function MapService() {
var zhongliType = sessionStorage.getItem('zhongliType');//获取是否仲利账号状态,从本地内存中拿取数据 var zhongliType = sessionStorage.getItem('zhongliType');//获取是否仲利账号状态,从本地内存中拿取数据
MapService.prototype = { MapService.prototype = {
init: function (id) { init: function (id,options) {
var self = this; var self = this;
let params = options||{}
if(self.map){
self.map.destroy()
}
var map = new AMap.Map(id, { var map = new AMap.Map(id, {
resizeEnable: true, resizeEnable: true,
zoom: 11 zoom: params.zoom||11
}); });
// 添加比例尺 // 添加比例尺
...@@ -854,8 +858,31 @@ MapService.prototype = { ...@@ -854,8 +858,31 @@ MapService.prototype = {
openPage(path) { openPage(path) {
vue.prototype.$parentCommon.setBreadCrumbs(path); vue.prototype.$parentCommon.setBreadCrumbs(path);
window.open(path) window.open(path)
} },
// 区域查车弹框
createAraeInfowindow(info){
let _types = {
1:'有线设备',
0:'无线设备'
}
let _div = `<h3 class="map-infowindow-title">${info.ownerName || '--'}/${info.vin || '--'}</h3>
<div class="map-infowindow-ct">
<p><i class="icon icon-info_device"></i> 设备号:<span class="des"> ${info.sn||'--'} (${_types[info.source]||'--'})</span>
<span class="battery" data-battery style="display:${info.battery?'block':'none'}">
<i class="fill"><i class="fill-percentage" data-battery-percentage style="width:${info.battery}%;"></i></i>
<i class="icon icon-battery_enough"></i>
<i class="text" data-battery-text>${info.battery}</i>
</span></p>
</div>`;
var infoWindow = new AMap.InfoWindow({
offset: new AMap.Pixel(0, -20),
content: _div,
autoMove: true,
position:[info.lng,info.lat]
})
return infoWindow
},
} }
......
...@@ -2,13 +2,32 @@ const MAPGEO = { ...@@ -2,13 +2,32 @@ const MAPGEO = {
geocoder: null, geocoder: null,
getGeocoder: function () { getGeocoder: function () {
return new Promise((resolve) => { return new Promise((resolve) => {
AMap.service('AMap.Geocoder', function () {//回调函数 // 高德地图兼容方式,兼容低版本
// if(AMap.service){
// AMap.service('AMap.Geocoder', function () {//回调函数
// var geocoder = new AMap.Geocoder({
// batch: true
// });
// MAPGEO.geocoder = geocoder;
// resolve(geocoder);
// });
// }else{
// AMap.plugin('AMap.Geocoder', function () {//回调函数
// var geocoder = new AMap.Geocoder({
// batch: true
// });
// MAPGEO.geocoder = geocoder;
// resolve(geocoder);
// });
// }
AMap.plugin('AMap.Geocoder', function () {//回调函数
var geocoder = new AMap.Geocoder({ var geocoder = new AMap.Geocoder({
batch: true batch: true
}); });
MAPGEO.geocoder = geocoder; MAPGEO.geocoder = geocoder;
resolve(geocoder); resolve(geocoder);
}); });
}) })
}, },
transferAddressByGroup(obj, cb) { transferAddressByGroup(obj, cb) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!