Commit 88012d4b by 吴娟华

'1.2.1'

1 parent 333bfea4
...@@ -15,7 +15,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl ...@@ -15,7 +15,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
//localhost:10500 //localhost:10500
const IS_DEV_MODE = process.env.NODE_ENV !== 'production' const IS_DEV_MODE = process.env.NODE_ENV !== 'production'
const getPublicPath = IS_DEV_MODE ? '' : './'; const getPublicPath = IS_DEV_MODE ? '' : './';
const resourcesPath = IS_DEV_MODE ? `//localhost:${port}` : 'https://e-shield-old.glsx.com.cn'; const resourcesPath = IS_DEV_MODE ? `http://localhost:${port}` : 'https://e-shield-old.glsx.com.cn';
module.exports = { module.exports = {
mode: IS_DEV_MODE ? 'development':'production', mode: IS_DEV_MODE ? 'development':'production',
...@@ -192,7 +192,7 @@ module.exports = { ...@@ -192,7 +192,7 @@ module.exports = {
proxy: { proxy: {
'/ots': { '/ots': {
changeOrigin: true, changeOrigin: true,
target: 'http://e-shield.glsx.net'//'http://e-shield.glsx.net'//'http://192.168.1.158:8088'//'http://e-shield.didihu.com.cn'//'http://192.168.1.53:8088'//'http://localhost:8088'//'http://tiger-sso.didihu.com.cn'// http://vjg7.branch.glsx.com.cn/ target: 'http://192.168.2.53:8889/'//'http://e-shield.glsx.net'//'http://e-shield.glsx.net'//'http://192.168.1.158:8088'//'http://e-shield.didihu.com.cn'//'http://192.168.1.53:8088'//'http://localhost:8088'//'http://tiger-sso.didihu.com.cn'// http://vjg7.branch.glsx.com.cn/
} }
} }
}, },
......
import api from '../config.js' import api from '../config.js'
import request from './request'
export default { export default {
getVehicleList (request = {}) { getVehicleList (params = {}) {
return request(params, '/trialdrive/vehicle/vehicleinfo/search', 'get')
},
checkSnType(params = {}) {
return request(params, '/trialdrive/vehicle/vehicleinfo/getclassifynamebysn', 'get')
},
addVehicle(params = {}) {
return request(params, '/trialdrive/vehicle/vehicleinfo/save', 'post')
},
updateVehicle(params = {}) {
return request(params, '/trialdrive/vehicle/vehicleinfo/update', 'post')
},
/* getVehicleList (request = {}) {
return api.get('vehicle/getVehicleList', request) return api.get('vehicle/getVehicleList', request)
}, },
getVehicleListTotal (request = {}) { getVehicleListTotal (request = {}) {
...@@ -18,7 +31,7 @@ export default { ...@@ -18,7 +31,7 @@ export default {
}, },
saveVehicleForm(request = {}) { saveVehicleForm(request = {}) {
return api.post('vehicle/edit', request) return api.post('vehicle/edit', request)
}, }, */
/*工单管理*/ /*工单管理*/
getWorkOrderList(request = {}) { getWorkOrderList(request = {}) {
......
...@@ -28,7 +28,26 @@ export default { ...@@ -28,7 +28,26 @@ export default {
getSpecialShopList(params = {}) { getSpecialShopList(params = {}) {
return request(params, '/trialdrive/specialshop/shopusers', 'get') return request(params, '/trialdrive/specialshop/shopusers', 'get')
}, },
getVehicleTree(params = {}) {
return request(params, '/trialdrive/monitor/vtree', 'get')
},
getVehicleTreeUserList(params = {}) {
return request(params, '/trialdrive/monitor/uvlist', 'get')
},
getVehicleTreeUserIds(params = {}) {
return request(params, '/trialdrive/monitor/ovlist', 'get')
},
getDevicesLocation(params = {}) {
return request(params, '/trialdrive/monitor/vehiclelocation', 'get')
},
getTrackHistory(params = {}) {
return request(params, '/devicemonitor/monitor/listtrackpoint', 'get')
},
getHistoryLocation(params = {}) {
return request(params, '/devicemonitor/monitor/liststaypoint', 'get')
},
// 旧虎哥 // 旧虎哥
/*车辆监控*/ /*车辆监控*/
// getCriteriaTreeList (request = {}) { // getCriteriaTreeList (request = {}) {
......
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
} }
.stay-list{ .stay-list{
/* height: calc(100% - 70px); */ /* height: calc(100% - 70px); */
max-height: calc(100vh - 120px); max-height: calc(100vh - 200px);
overflow-y: auto; overflow-y: auto;
} }
.stay-list-item{ .stay-list-item{
......
.icon {display: inline-block;background-image: url(~sprite.png);background-size: 119px 97px; vertical-align: middle;} .icon {display: inline-block;background-image: url(~sprite.png);background-size: 119px 97px; vertical-align: middle;}
.icon-battery_empty { width: 42px; height: 20px; background-position: 0px 0px; } .icon-battery_empty { width: 42px; height: 20px; background-position: 0px 0px; }
.icon-battery_enough { width: 42px; height: 20px; background-position: 0px -20px; } .icon-battery_enough { width: 42px; height: 20px; background-position: 0px -20px; }
.icon-fullsize.active { width: 18px; height: 18px; background-position: 0px -79px; } .icon-fullsize.active { width: 18px; height: 18px; background-position: -18px -79px; }
.icon-fullsize:active { width: 18px; height: 18px; background-position: 0px -79px; } .icon-fullsize:active { width: 18px; height: 18px; background-position: -18px -79px; }
.icon-fullsize:hover { background-position: 0px -79px; } .icon-fullsize:hover { background-position: -18px -79px; }
.icon-fullsize { width: 18px; height: 18px; background-position: -18px -79px; } .icon-fullsize { width: 18px; height: 18px; background-position: 0px -79px; }
.icon-icon_zoom_out.active { width: 18px; height: 18px; background-position: -36px -79px; } .icon-icon_zoom_out.active { width: 18px; height: 18px; background-position: -72px -79px; }
.icon-icon_zoom_out:active { width: 18px; height: 18px; background-position: -36px -79px; } .icon-icon_zoom_out:active { width: 18px; height: 18px; background-position: -72px -79px; }
.icon-icon_zoom_out:hover { background-position: -36px -79px; } .icon-icon_zoom_out:hover { background-position: -72px -79px; }
.icon-icon_zoom_out { width: 18px; height: 18px; background-position: -54px -79px; } .icon-icon_zoom_out { width: 18px; height: 18px; background-position: -54px -79px; }
.icon-info_copy.active { width: 16px; height: 16px; background-position: -101px -36px; } .icon-info_copy.active { width: 16px; height: 16px; background-position: -101px -36px; }
.icon-info_copy:active { width: 16px; height: 16px; background-position: -101px -36px; } .icon-info_copy:active { width: 16px; height: 16px; background-position: -101px -36px; }
.icon-info_copy:hover { background-position: -101px -36px; } .icon-info_copy:hover { background-position: -101px -36px; }
.icon-info_copy { width: 16px; height: 16px; background-position: -101px -52px; } .icon-info_copy { width: 16px; height: 16px; background-position: -101px -52px; }
.icon-info_device_alarm { width: 20px; height: 20px; background-position: -42px 0px; } .icon-info_device_alarm { width: 20px; height: 20px; background-position: -62px -20px; }
.icon-info_device_status { width: 20px; height: 20px; background-position: -42px -20px; } .icon-info_device_status { width: 20px; height: 20px; background-position: -62px 0px; }
.icon-info_device { width: 20px; height: 20px; background-position: 0px -40px; } .icon-info_device { width: 20px; height: 20px; background-position: -40px -40px; }
.icon-info_location { width: 20px; height: 20px; background-position: -20px -40px; } .icon-info_location { width: 20px; height: 20px; background-position: -20px -40px; }
.icon-info_stop { width: 20px; height: 20px; background-position: -40px -40px; } .icon-info_stop { width: 20px; height: 20px; background-position: 0px -40px; }
.icon-info_time { width: 20px; height: 20px; background-position: -62px 0px; } .icon-info_time { width: 20px; height: 20px; background-position: -42px -20px; }
.icon-info_type { width: 20px; height: 20px; background-position: -62px -20px; } .icon-info_type { width: 20px; height: 20px; background-position: -42px 0px; }
.icon-locate.active { width: 19px; height: 19px; background-position: -62px -40px; } .icon-locate.active { width: 19px; height: 19px; background-position: 0px -60px; }
.icon-locate:active { width: 19px; height: 19px; background-position: -62px -40px; } .icon-locate:active { width: 19px; height: 19px; background-position: 0px -60px; }
.icon-locate:hover { background-position: -62px -40px; } .icon-locate:hover { background-position: 0px -60px; }
.icon-locate { width: 19px; height: 19px; background-position: 0px -60px; } .icon-locate { width: 19px; height: 19px; background-position: -19px -60px; }
.icon-minisize.active { width: 18px; height: 19px; background-position: -82px -19px; } .icon-minisize.active { width: 18px; height: 19px; background-position: -82px -19px; }
.icon-minisize:active { width: 18px; height: 19px; background-position: -82px -19px; } .icon-minisize:active { width: 18px; height: 19px; background-position: -82px -19px; }
.icon-minisize:hover { background-position: -82px -19px; } .icon-minisize:hover { background-position: -82px -19px; }
.icon-minisize { width: 18px; height: 18px; background-position: -72px -79px; } .icon-minisize { width: 18px; height: 18px; background-position: -36px -79px; }
.icon-refresh.active { width: 18px; height: 19px; background-position: -82px -38px; } .icon-refresh.active { width: 18px; height: 19px; background-position: -82px -38px; }
.icon-refresh:active { width: 18px; height: 19px; background-position: -82px -38px; } .icon-refresh:active { width: 18px; height: 19px; background-position: -82px -38px; }
.icon-refresh:hover { background-position: -82px -38px; } .icon-refresh:hover { background-position: -82px -38px; }
.icon-refresh { width: 18px; height: 19px; background-position: -82px -57px; } .icon-refresh { width: 18px; height: 19px; background-position: -82px -57px; }
.icon-ruler.active { width: 19px; height: 19px; background-position: -19px -60px; } .icon-ruler.active { width: 19px; height: 19px; background-position: -57px -60px; }
.icon-ruler:active { width: 19px; height: 19px; background-position: -19px -60px; } .icon-ruler:active { width: 19px; height: 19px; background-position: -57px -60px; }
.icon-ruler:hover { background-position: -19px -60px; } .icon-ruler:hover { background-position: -57px -60px; }
.icon-ruler { width: 19px; height: 19px; background-position: -38px -60px; } .icon-ruler { width: 19px; height: 19px; background-position: -82px 0px; }
.icon-satellite.active { width: 18px; height: 18px; background-position: -101px 0px; } .icon-satellite.active { width: 18px; height: 18px; background-position: -101px 0px; }
.icon-satellite:active { width: 18px; height: 18px; background-position: -101px 0px; } .icon-satellite:active { width: 18px; height: 18px; background-position: -101px 0px; }
.icon-satellite:hover { background-position: -101px 0px; } .icon-satellite:hover { background-position: -101px 0px; }
.icon-satellite { width: 18px; height: 18px; background-position: -101px -18px; } .icon-satellite { width: 18px; height: 18px; background-position: -101px -18px; }
.icon-zoom_in.active { width: 19px; height: 19px; background-position: -57px -60px; }
.icon-zoom_in:active { width: 19px; height: 19px; background-position: -57px -60px; }
.icon-zoom_in:hover { background-position: -57px -60px; }
.icon-zoom_in { width: 19px; height: 19px; background-position: -82px 0px; }
\ No newline at end of file \ No newline at end of file
.icon-zoom_in.active { width: 19px; height: 19px; background-position: -38px -60px; }
.icon-zoom_in:active { width: 19px; height: 19px; background-position: -38px -60px; }
.icon-zoom_in:hover { background-position: -38px -60px; }
.icon-zoom_in { width: 19px; height: 19px; background-position: -62px -40px; }
\ No newline at end of file \ No newline at end of file

8.86 KB | W: | H:

8.81 KB | W: | H:

src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
src/assets/spritesmith-generated/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -23,11 +23,12 @@ export default{ ...@@ -23,11 +23,12 @@ export default{
} }
.main-wrap.full-width{ .main-wrap.full-width{
position: fixed; position: fixed;
width: 100%; width: calc(100% - 200px);
height: 100%; height: calc(100% - 60px);
top: 0; top: 60px;
left: 190px; left: 200px;
background: #fff; background: #fff;
padding: 0;
} }
.ibox{ .ibox{
background-color: #fff; background-color: #fff;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</el-form-item> </el-form-item>
<el-form-item label="" prop="filename"> <el-form-item label="" prop="filename">
<el-upload ref="upload" class="upload-wrap" <el-upload ref="upload" class="upload-wrap"
action="vehicle/importDeviceSn" :action="baseURL+'/trialdrive/vehicle/vehicleinfo/import'"
:on-change="changeFile" :on-change="changeFile"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:multiple="false" :multiple="false"
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
:on-success="successUpload" :on-success="successUpload"
:on-error="errorUpload" :on-error="errorUpload"
:data="data" :data="data"
:headers="myHeaders"
:auto-upload="false"> :auto-upload="false">
<el-input v-model="filename" placeholder="未选取任何文件" class="input-with-select" size="small" > <el-input v-model="filename" placeholder="未选取任何文件" class="input-with-select" size="small" >
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
<script> <script>
import {exportExcel} from 'utils' import {exportExcel} from 'utils'
import deviceSelect from './DeviceSelect.vue' import deviceSelect from './DeviceSelect.vue'
var token = localStorage.getItem('token') || ''
export default{ export default{
props: ['importModalVisible', 'sourceFrom'], props: ['importModalVisible', 'sourceFrom'],
...@@ -88,14 +90,19 @@ ...@@ -88,14 +90,19 @@
device2AddressStatus: 3 device2AddressStatus: 3
}, },
rules: { rules: {
deviceHardwareId: [{validator: checkId, trigger: 'blur'}], //deviceHardwareId: [{validator: checkId, trigger: 'blur'}],
filename: [{validator: checkFilename, trigger: 'change'}], filename: [{validator: checkFilename, trigger: 'change'}],
} },
baseURL: this.$store.getters.baseURL,
myHeaders: {Authorization: token},
errorFile: ''
} }
}, },
computed:{ computed:{
'disabled'(){ 'disabled'(){
return (this.form.deviceHardwareId === '' || this.filename === '') return (
//this.form.deviceHardwareId === '' ||
this.filename === '')
} }
}, },
methods: { methods: {
...@@ -112,18 +119,19 @@ ...@@ -112,18 +119,19 @@
}, },
exportErrorResult(){ exportErrorResult(){
exportExcel('vehicle/exportFailDeviceSn', {seqNo: this.seqNo}) //exportExcel('vehicle/exportFailDeviceSn', {seqNo: this.seqNo})
window.open(this.errorFile, '_blank')
}, },
successUpload(res){ successUpload(res){
this.importing = false; this.importing = false;
if(typeof res === 'object'){ if(typeof res === 'object'){
if(res.returnCode == 0){ if(res.code == 200){
const data = res.data; const data = res.data;
this.successNum = data.success; this.successNum = data.succNum;
this.errorNum = parseInt(data.fail); this.errorNum = parseInt(data.failNum);
this.seqNo = data.seqNo; this.seqNo = data.seqNo;
this.errorFile = data.failSeqNoFile
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();
this.showResult = true; this.showResult = true;
...@@ -134,16 +142,16 @@ ...@@ -134,16 +142,16 @@
}); });
} }
}else{ }else{
window.location.href = '../ots/login'; //window.location.href = '../ots/login';
} }
}, },
errorUpload(err){ errorUpload(err){
window.location.href = '../ots/login'; //window.location.href = '../ots/login';
}, },
submitUpload() { submitUpload() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if(valid){ if(valid){
this.data.deviceHardwareId = this.form.deviceHardwareId //this.data.deviceHardwareId = this.form.deviceHardwareId
this.$refs.upload.submit(); this.$refs.upload.submit();
} }
}) })
...@@ -160,7 +168,7 @@ ...@@ -160,7 +168,7 @@
return false return false
}, },
downloadTpl(){ downloadTpl(){
exportExcel('vehicle/downLoadDeviceSn') exportExcel('/trialdrive/vehicle/vehicleinfo/downloadtemplate')
}, },
openDialog(){ openDialog(){
this.$emit('onImportModalChange', true) this.$emit('onImportModalChange', true)
......
...@@ -9,65 +9,51 @@ ...@@ -9,65 +9,51 @@
<a :class="scrollToRef=='carInfo'?'active':''" @click="scrollTo('carInfo')">车辆信息</a> <a :class="scrollToRef=='carInfo'?'active':''" @click="scrollTo('carInfo')">车辆信息</a>
<a :class="scrollToRef=='clientInfo'?'active':''" @click="scrollTo('clientInfo')">关联商户</a> <a :class="scrollToRef=='clientInfo'?'active':''" @click="scrollTo('clientInfo')">关联商户</a>
<a :class="scrollToRef=='log'?'active':''" @click="scrollTo('log')">操作日志</a> <a :class="scrollToRef=='log'?'active':''" @click="scrollTo('log')">操作日志</a>
<a :class="scrollToRef=='poi'?'active':''" @click="scrollTo('poi')">POI信息</a> <!-- <a :class="scrollToRef=='poi'?'active':''" @click="scrollTo('poi')">POI信息</a> -->
</nav> </nav>
</div> </div>
<div v-show="showTab==='form'"> <div v-show="showTab==='form'">
<el-form ref="detailForm" :model="detailForm" :rules="rules" :inline="false" size="mini" label-width="110px" > <el-form ref="detailForm" :model="detailForm" :rules="rules" :inline="false" size="mini" label-width="110px" >
<h3>设备信息</h3> <h3>设备信息</h3>
<el-row> <el-row>
<el-col :span="16">
<el-row v-for="(item, index) in deviceArr" :key="index">
<el-col :span="12">
<el-form-item label="设备SN号" prop="device">
<el-input v-model="item.sn"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备型号">
<el-input disabled v-model="item.deviceType"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="8">
<el-form-item label="*设备SN号">
<el-input disabled v-model="detailForm.trackInfo.sn"></el-input>
</el-form-item>
<el-form-item label="*验证码">
<el-input disabled v-model="detailForm.trackInfo.checkCode"></el-input>
</el-form-item>
<el-form-item label="*设备型号">
<el-input disabled v-model="detailForm.trackInfo.deviceType"></el-input>
</el-form-item>
<el-form-item label=" " v-if="detailForm.trackInfo.isActive==1">
<p class="tip el-alert--success">验证通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
<el-form-item label=" " v-else>
<p class="tip el-alert--error">验证不通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
</el-col> -->
</el-row>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="*设备SN号"> <i @click="addDevice" class="el-icon-circle-plus-outline" style="font-size: 20px; margin-left:20px; line-height:30px;"></i>
<el-input disabled v-model="detailForm.trackInfo.sn"></el-input>
</el-form-item>
<el-form-item label="*验证码">
<el-input disabled v-model="detailForm.trackInfo.checkCode"></el-input>
</el-form-item>
<el-form-item label="*设备型号">
<el-input disabled v-model="detailForm.trackInfo.deviceType"></el-input>
</el-form-item>
<el-form-item label=" " v-if="detailForm.trackInfo.isActive==1">
<p class="tip el-alert--success">验证通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
<el-form-item label=" " v-else>
<p class="tip el-alert--error">验证不通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
</el-col> </el-col>
<!-- <el-col :span="8">
<el-form-item label="*设备SN号">
<el-input disabled v-model="detailForm.trackInfo.sn"></el-input>
</el-form-item>
<el-form-item label="*验证码">
<el-input disabled v-model="detailForm.trackInfo.checkCode"></el-input>
</el-form-item>
<el-form-item label="*设备型号">
<el-input disabled v-model="detailForm.trackInfo.deviceType"></el-input>
</el-form-item>
<el-form-item label=" " v-if="detailForm.trackInfo.isActive==1">
<p class="tip el-alert--success">验证通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
<el-form-item label=" " v-else>
<p class="tip el-alert--error">验证不通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="*设备SN号">
<el-input disabled v-model="detailForm.trackInfo.sn"></el-input>
</el-form-item>
<el-form-item label="*验证码">
<el-input disabled v-model="detailForm.trackInfo.checkCode"></el-input>
</el-form-item>
<el-form-item label="*设备型号">
<el-input disabled v-model="detailForm.trackInfo.deviceType"></el-input>
</el-form-item>
<el-form-item label=" " v-if="detailForm.trackInfo.isActive==1">
<p class="tip el-alert--success">验证通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
<el-form-item label=" " v-else>
<p class="tip el-alert--error">验证不通过<br>{{detailForm.trackInfo.activeDate}}</p>
</el-form-item>
</el-col> -->
</el-row> </el-row>
<p style="text-align:center; margin: 0"></p>
<h3 ref="userInfo">用户信息</h3> <h3 ref="userInfo">用户信息</h3>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
...@@ -314,10 +300,17 @@ export default{ ...@@ -314,10 +300,17 @@ export default{
displacement: [ displacement: [
{ pattern: /^(((([1-9][0-9])|[1-9])(\.\d)?)|(0\.[1-9]))$/, message: '请输入正确的格式(0.1-99.9)L', trigger: 'blur' } { pattern: /^(((([1-9][0-9])|[1-9])(\.\d)?)|(0\.[1-9]))$/, message: '请输入正确的格式(0.1-99.9)L', trigger: 'blur' }
], ],
device: [
{required: true, message: '请输入姓名', trigger: 'blur'},
],
}, },
trash: [], trash: [],
mapSearch: '', mapSearch: '',
freqTableData: [] freqTableData: [],
deviceArr: [{
sn: '',
deviceType: ''
}]
} }
}, },
async created () { async created () {
...@@ -781,6 +774,13 @@ export default{ ...@@ -781,6 +774,13 @@ export default{
}) })
} }
}) })
},
addDevice(){
this.deviceArr.push({
sn: '',
deviceType: ''
})
this.rules['device'+this.deviceArr.length-1] = [{required: true, message: '请输入姓名', trigger: 'blur'}]
} }
/*prev(){ /*prev(){
if(this.num==0){ if(this.num==0){
......
...@@ -324,16 +324,16 @@ ...@@ -324,16 +324,16 @@
if(!this.sn) return; if(!this.sn) return;
const params = {}; const params = {};
params.sn = this.sn; params.sn = this.sn;
params.sTime = moment(this.form.dateRange[0]).format('YYYY-MM-DD HH:mm:ss'); params.startTime = moment(this.form.dateRange[0]).format('YYYY-MM-DD HH:mm:ss');
params.eTime = moment(this.form.dateRange[1]).format('YYYY-MM-DD HH:mm:ss'); params.endTime = moment(this.form.dateRange[1]).format('YYYY-MM-DD HH:mm:ss');
this.replayIniting = true; this.replayIniting = true;
const resource = this.form.replayType == 'RtTrack'?MONITOR_SERVICE.getTrackHistory:MONITOR_SERVICE.getBaseStationHistory; //const resource = this.form.replayType == 'RtTrack'?MONITOR_SERVICE.getTrackHistory:MONITOR_SERVICE.getBaseStationHistory;
params.locationType = this.form.replayType == 'RtTrack' ? 0 : 1
resource(params).then((result)=>{ MONITOR_SERVICE.getTrackHistory(params).then((result)=>{
//result = mock.getTrackHistory //result = mock.getTrackHistory
console.log(result)
if(result.returnCode == '0'){ if(result.code == '200'){
let data = result.data; let data = result.data;
this.replayData = data; this.replayData = data;
if(data&&data.length){ if(data&&data.length){
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
}else{ }else{
EventBus.$emit('uiMap.replay.destroy'); EventBus.$emit('uiMap.replay.destroy');
this.$confirm(`<p>${result.message?result.message:'暂无轨迹数据!'}</p>`, '提示', { this.$confirm(`<p>${'暂无轨迹数据!'}</p>`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
showCancelButton: false, showCancelButton: false,
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
...@@ -425,7 +425,7 @@ ...@@ -425,7 +425,7 @@
case 'carName': case 'carName':
case 'standNo': case 'standNo':
case 'sn': case 'sn':
case 'time': case 'dateTime':
case 'speed': case 'speed':
case 'userTel': case 'userTel':
case 'activeTime': case 'activeTime':
...@@ -448,10 +448,12 @@ ...@@ -448,10 +448,12 @@
paramArr.push(paramItem); paramArr.push(paramItem);
}); });
exportExcel('track/exportCsv', { exportExcel('/devicemonitor/monitor/exporttrackpoint', {
jsonStr: encodeURI(JSON.stringify(paramArr)), expData: encodeURI(JSON.stringify(paramArr)),
sTime: moment(this.form.dateRange[0]).format('YYYY-MM-DD HH:mm:ss'), startTime: moment(this.form.dateRange[0]).format('YYYY-MM-DD HH:mm:ss'),
eTime: moment(this.form.dateRange[1]).format('YYYY-MM-DD HH:mm:ss'), endTime: moment(this.form.dateRange[1]).format('YYYY-MM-DD HH:mm:ss'),
locationType: this.form.replayType == 'RtTrack' ? 0 : 1,
sn: this.sn
}, 'post', ()=>{ }, 'post', ()=>{
this.exporting = false; this.exporting = false;
}); });
...@@ -459,12 +461,14 @@ ...@@ -459,12 +461,14 @@
getHistoryLocation(){ getHistoryLocation(){
this.resultList = []; this.resultList = [];
MONITOR_SERVICE.getHistoryLocation({ MONITOR_SERVICE.getHistoryLocation({
sn: this.sn, sn: this.sn,//'90903010001',
sTime: moment(this.form.dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'), startTime: moment(this.form.dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'),//'2018-03-22 09:47:43',//
eTime: moment(this.form.dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss'), endTime: moment(this.form.dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss'),//'2019-10-27 09:56:45',//
times: '0', times: '0',
locationType: this.form.replayType == 'RtTrack' ? 0 : 1
}).then((res)=>{ }).then((res)=>{
if(res.returnCode == 0){ console.log(res)
if(res.code == 200){
const data = res.data; const data = res.data;
if(data.length){ if(data.length){
data.forEach((item, idx)=>{ data.forEach((item, idx)=>{
...@@ -491,9 +495,12 @@ ...@@ -491,9 +495,12 @@
arr.push(item); arr.push(item);
}); });
exportExcel('track/exportVMData', { exportExcel('/devicemonitor/monitor/exportstaypoint', {
vmExportType: 6, sn: this.sn,
jsonStr: encodeURI(JSON.stringify(arr)) vin: this.standno,
name: this.name,
locationType: this.form.replayType == 'RtTrack' ? 0 : 1,
expData: encodeURI(JSON.stringify(arr))
}, 'post'); }, 'post');
} }
}, },
...@@ -600,7 +607,7 @@ ...@@ -600,7 +607,7 @@
//轨迹播放结束 //轨迹播放结束
EventBus.$on('uiMap.replay.done', ()=>{ EventBus.$on('uiMap.replay.done', ()=>{
this.replayIng = false; this.replayIng = false;
this.$alert(`<p>开始时间: ${this.replayData[0].time}</p><p>结束时间: ${this.replayData[this.replayData.length-1].time}</p>`, '轨迹播放完成', { this.$alert(`<p>开始时间: ${this.replayData[0].dateTime}</p><p>结束时间: ${this.replayData[this.replayData.length-1].dateTime}</p>`, '轨迹播放完成', {
type: 'success', type: 'success',
confirmButtonText: '确定', confirmButtonText: '确定',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
......
...@@ -2,6 +2,7 @@ import { CONSTANT } from '../constant.js' ...@@ -2,6 +2,7 @@ import { CONSTANT } from '../constant.js'
import axios from 'axios' import axios from 'axios'
import qs from 'qs' import qs from 'qs'
import { Message } from "element-ui"; import { Message } from "element-ui";
import store from '../vuex/store'
export default (url, oParam, datatype, cb) => { export default (url, oParam, datatype, cb) => {
/*let exportForm = document.querySelector("#exportForm"); /*let exportForm = document.querySelector("#exportForm");
...@@ -25,12 +26,14 @@ export default (url, oParam, datatype, cb) => { ...@@ -25,12 +26,14 @@ export default (url, oParam, datatype, cb) => {
} }
exportForm.innerHTML = _input; exportForm.innerHTML = _input;
exportForm.submit();*/ exportForm.submit();*/
url = CONSTANT.API_URL+url let BASE_URL = store.getters.baseURL;
url = BASE_URL+url
if (datatype == 'post') { if (datatype == 'post') {
axios.post(url, typeof oParam == 'string'?oParam:qs.stringify(oParam), { axios.post(url, typeof oParam == 'string'?oParam:qs.stringify(oParam), {
responseType: 'blob', //指定返回数据的格式为blob responseType: 'blob', //指定返回数据的格式为blob
headers: { headers: {
'Content-Type': typeof oParam == 'string'?'application/json':'application/x-www-form-urlencoded; charset=UTF-8' 'Content-Type': typeof oParam == 'string'?'application/json':'application/x-www-form-urlencoded; charset=UTF-8',
Authorization: localStorage.getItem('token') || ''
} }
}) })
.then(response => { .then(response => {
...@@ -49,7 +52,8 @@ export default (url, oParam, datatype, cb) => { ...@@ -49,7 +52,8 @@ export default (url, oParam, datatype, cb) => {
responseType: 'blob', //指定返回数据的格式为blob responseType: 'blob', //指定返回数据的格式为blob
params: oParam, params: oParam,
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
Authorization: localStorage.getItem('token') || ''
} }
}) })
.then(response => { .then(response => {
......
import EventBus from '../event-bus' import EventBus from '../event-bus'
import mapService from './mapService.js' import mapService from './mapService.js'
import MAPGEO from './mapgeo' import MAPGEO from './mapgeo'
import { Message } from "element-ui";
import {services} from '../api'
const MONITOR_SERVICE = services.monitor;
//车辆监控 //车辆监控
const monitor = { const monitor = {
...@@ -95,6 +98,43 @@ const monitor = { ...@@ -95,6 +98,43 @@ const monitor = {
this.compareDestroy() this.compareDestroy()
this.isCompare = true this.isCompare = true
}); });
EventBus.$on('uiMap.monitor.wifiLocate', (data) => {
EventBus.$emit('uiMap.monitor.terminate');
const {info, infoDiv, gpsBtn, baseBtn, wifiBtn} = data
MONITOR_SERVICE.getWifiLocationBySn({
apType: 5,
sn: info.sn
}).then((res)=>{
if(res.returnCode == 0){
const data = res.data
if(data){
const transferObj = {elat: data.wifiLat, elng: data.wifiLng}
MAPGEO.transferAddressByGroup({data: [transferObj]}, ()=>{
infoDiv.querySelector('[data-transferAddress]').textContent = transferObj.transferAddress;
infoDiv.querySelector('[data-time]').textContent = data.lastReportTime;
})
const snSourceType = `${info.sn}:${info.isSource}`
if(this.markers[snSourceType]){
this.markers[snSourceType].setPosition(mapService.getLngLat(parseFloat(transferObj.elng), parseFloat(transferObj.elat)));
this.infowins[snSourceType].setPosition(mapService.getLngLat(parseFloat(transferObj.elng), parseFloat(transferObj.elat)));
}
gpsBtn && gpsBtn.classList.remove('el-button--primary');
baseBtn && baseBtn.classList.remove('el-button--primary');
wifiBtn && wifiBtn.classList.add('el-button--primary');
info.eLocateType = 'wifi'
}else{
Message({
type: 'info',
message: '暂无wifi数据'
});
}
}
EventBus.$emit('uiMap.monitor.drawDone');
})
})
}, },
draw(data, autoOpenLastInfoWindow){ draw(data, autoOpenLastInfoWindow){
const MAP = mapService.map; const MAP = mapService.map;
...@@ -102,10 +142,10 @@ const monitor = { ...@@ -102,10 +142,10 @@ const monitor = {
const transferObj = [] const transferObj = []
data.forEach((item)=>{ data.forEach((item)=>{
if(item.gpsLocation.elat && item.gpsLocation.elng){ if(item.gpsLocation && item.gpsLocation.elat && item.gpsLocation.elng){
transferObj.push(item.gpsLocation) transferObj.push(item.gpsLocation)
} }
if(item.bsLocation.elat && item.bsLocation.elng){ if(item.bsLocation && item.bsLocation.elat && item.bsLocation.elng){
transferObj.push(item.bsLocation) transferObj.push(item.bsLocation)
} }
}) })
......
...@@ -17,9 +17,6 @@ export default function remoteLoad (url, hasCallback) { ...@@ -17,9 +17,6 @@ export default function remoteLoad (url, hasCallback) {
scriptElement.addEventListener('load', e => { scriptElement.addEventListener('load', e => {
removeScript(scriptElement) removeScript(scriptElement)
resolve(e) resolve(e)
// if (!hasCallback) {
// resolve(e)
// }
}, false) }, false)
scriptElement.addEventListener('error', e => { scriptElement.addEventListener('error', e => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!