Commit 2bbf1993 authored by caicaicai's avatar caicaicai

修改

parent 2128f067
{
"map3d": {
"scene": {
"center": {"lat":39.276448,"lng":115.358833,"alt":2784,"heading":360,"pitch":-90},
"center": {"lat":37.52,"lng":122.12,"alt":2784,"heading":360,"pitch":-90},
"scene3DOnly": false,
"shadows": false,
"removeDblClick": true,
......
......@@ -43,50 +43,50 @@ export default {
data(){
return{
persons:[
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
],
zuobianData:[],
......
......@@ -43,50 +43,50 @@ export default {
data(){
return{
persons:[
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
],
zuobianData:[],
......@@ -136,25 +136,25 @@ export default {
//后台获取数据
getCoordinate() {
let that = this;
// HttpReq.truckDispatching.screenMapSetUpQuery({size:9999}).then((res) => {
// if(true){;
// //console.log(res);
// let data1 = [];
// for(let key in res){
// that.weilanName.push(key);
// let arrays = [];
// res[key].forEach(function(item){
// var arr = [];
// arr[0] = item.lon;
// arr[1] = item.lat;
// arr[2] = "500";
// arrays.push(arr);
// })
// data1.push(arrays)
// }
// that.zuobianData = data1
//console.log("zuobianData",that.zuobianData);
//console.log("weilanName",that.weilanName);
HttpReq.truckDispatching.screenMapSetUpQuery({size:9999}).then((res) => {
if(true){;
//console.log(res);
let data1 = [];
for(let key in res){
that.weilanName.push(key);
let arrays = [];
res[key].forEach(function(item){
var arr = [];
arr[0] = item.lon;
arr[1] = item.lat;
arr[2] = "500";
arrays.push(arr);
})
data1.push(arrays)
}
that.zuobianData = data1
console.log("zuobianData",that.zuobianData);
console.log("weilanName",that.weilanName);
if (this.appendToBody) {
document.body.appendChild(this.$el)
......@@ -167,8 +167,8 @@ export default {
this.initMars3d(data.map3d)// 构建地图
})
}
// }
// })
}
})
},
//上传围栏数据
uploaded(){
......
......@@ -5,7 +5,7 @@
<div class="infoview">
<el-button type="primary" @click="btnStartDraw()">设置围栏</el-button>
<el-button type="primary" @click="uploaded()">上传围栏</el-button>
<!-- <el-button type="primary" @click="uploaded()">上传围栏</el-button> -->
<div style="display: inline-block;color:red;font-weight:bolder;">每次只允许上传一个围栏,并且围栏必须是封闭图形</div>
</div>
......@@ -43,50 +43,50 @@ export default {
data(){
return{
persons:[
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["115.358833", "39.276448", "500"],
["115.358638", "39.272818", "500"],
["115.368738", "39.272818", "500"],
["115.368638", "39.278518", "500"],
["115.358538", "39.278818", "500"],
["115.348538", "39.275818", "500"],
["115.351538", "39.273318", "500"],
["115.357833", "39.275448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
["122.128833", "37.526448", "500"],
["122.128638", "37.522818", "500"],
["122.128738", "37.522818", "500"],
["122.128638", "37.528518", "500"],
["122.128538", "37.528818", "500"],
["122.128538", "37.525818", "500"],
["122.121538", "37.523318", "500"],
["122.127833", "37.525448", "500"],
],
zuobianData:[],
......@@ -171,54 +171,32 @@ export default {
// })
},
//上传围栏数据
uploaded(){
uploaded(text){
let newData = [...this.toJavaCoordinates];
newData.pop();
if(this.toJavaCoordinates.length == 0){
this.$message({
type: 'warning',
message: '请绘制电子围栏'
});
}else{
this.$prompt('电子围栏名称不得为空且不能与之前围栏名称重复', '请输入电子围栏名称', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputErrorMessage: '输入不能为空',
inputValidator: (value) => { // 点击按钮时,对文本框里面的值进行验证
if(!value) {
return '输入不能为空';
}
},
}).then(({ value }) => {
// if(this.toJavaCoordinates.length == 0){
// this.$message({
// type: 'warning',
// message: '请绘制电子围栏'
// });
// }else{
let allObj = {};
allObj.name = value;
allObj.name = text;
allObj.zuobiao = newData;
this.toJavaCoordinates = [];
console.log(allObj);
//console.log(allObj);
//发送添加电子围栏请求
HttpReq.truckDispatching.screenMapSetUpAdd(allObj).then((res) => {
if(res.code == 200){
this.$notify({
title: '上传电子围栏成功',
title: '区域信息上传成功,即将重新加载',
type: 'success',
duration: 2500
});
}else{
this.$notify({
title: res.msg,
type: 'error',
duration: 2500
})
}
setTimeout(function (){
window.location.reload();
},2000);
}).catch(function(error) { });
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
});
});
}
//}
},
//创建地图
initMars3d(options) {
......@@ -238,25 +216,25 @@ export default {
this[`map${this.mapKey}`] = map
//围栏回显
that.zuobianData.forEach(function(item,index){
var graphicLayer = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer);
initLayerManager(graphicLayer,that.weilanName[index]);
that.addGraphic_01(graphicLayer,item,that.weilanName[index]);
})
// that.zuobianData.forEach(function(item,index){
// var graphicLayer = new mars3d.layer.GraphicLayer();
// map.addLayer(graphicLayer);
// initLayerManager(graphicLayer,that.weilanName[index]);
// that.addGraphic_01(graphicLayer,item,that.weilanName[index]);
// })
//创建矢量数据图层2
var graphicLayer1 = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer1);
var item = `<table style="width: auto;">
<tr>
<th scope="col" colspan="2" style="text-align:center;font-size:15px;">卡车号码:鲁K12345</th>
</tr>
<tr>
<td>名称:卡车一</td>
</tr>
</table>`;
initGraphicManager(graphicLayer1,item);
// var graphicLayer1 = new mars3d.layer.GraphicLayer();
// map.addLayer(graphicLayer1);
// var item = `<table style="width: auto;">
// <tr>
// <th scope="col" colspan="2" style="text-align:center;font-size:15px;">卡车号码:鲁K12345</th>
// </tr>
// <tr>
// <td>名称:卡车一</td>
// </tr>
// </table>`;
// initGraphicManager(graphicLayer1,item);
//this.addGraphic_02(graphicLayer1,this.persons);
// 抛出事件
......
......@@ -225,42 +225,42 @@ import $ from 'jquery'
// }
// },
// },
{
text: "删除对象",
iconCls: "fa fa-trash-o",
show: (event) => {
let graphic = event.graphic;
if (!graphic || graphic.isDestroy) {
return false;
} else {
return true;
}
},
callback: function (e) {
console.log(e);
let graphic = e.graphic;
if (!graphic) {
return;
}
//console.log(rowNameId);
HttpReq.truckDispatching.screenMapSetUpDel([rowNameId]).then((res) => {
if(res.status == 400){
this.$notify({
title: res.msg,
type: 'error',
duration: 2500
})
}else{
this.$notify({
title: '删除成功!',
type: 'success',
duration: 2500
});
}
})
graphicLayer.removeGraphic(graphic);
},
},
// {
// text: "删除对象",
// iconCls: "fa fa-trash-o",
// show: (event) => {
// let graphic = event.graphic;
// if (!graphic || graphic.isDestroy) {
// return false;
// } else {
// return true;
// }
// },
// callback: function (e) {
// console.log(e);
// let graphic = e.graphic;
// if (!graphic) {
// return;
// }
// //console.log(rowNameId);
// HttpReq.truckDispatching.screenMapSetUpDel([rowNameId]).then((res) => {
// if(res.status == 400){
// this.$notify({
// title: res.msg,
// type: 'error',
// duration: 2500
// })
// }else{
// this.$notify({
// title: '删除成功!',
// type: 'success',
// duration: 2500
// });
// }
// })
// graphicLayer.removeGraphic(graphic);
// },
// },
// {
// text: "计算长度",
// iconCls: "fa fa-medium",
......
......@@ -805,7 +805,7 @@ export default {
let formData1 = new FormData();
formData1.append("avatar", file);
Axios({
url: process.env.VUE_APP_LOCAL_API2 + '/api/wEquipment/updateAvatar',
url: process.env.VUE_APP_LOCAL_API2 + '/api/Area/updateAvatar',
method: "post",
data: formData1,
}).then(
......
......@@ -263,7 +263,7 @@ export default {
let formData1 = new FormData();
formData1.append("avatar", file);
Axios({
url: process.env.VUE_APP_LOCAL_API2 + '/api/wEquipment/updateAvatar',
url: process.env.VUE_APP_LOCAL_API2 + '/api/Area/updateAvatar',
method: "post",
data: formData1,
}).then(
......
......@@ -30,7 +30,8 @@
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">记住我</el-checkbox>
</div>
<div style="flex:1;text-align:right;color:#01d6fe;">
<a href="/register">去注册</a>
<!-- <a href="/register">去注册</a> -->
<router-link :to="{path:'/register'}">去注册</router-link>
</div>
</div>
<el-form-item style="width:100%;">
......
......@@ -805,7 +805,7 @@ export default {
let formData1 = new FormData();
formData1.append("avatar", file);
Axios({
url: process.env.VUE_APP_LOCAL_API2 + '/api/wEquipment/updateAvatar',
url: process.env.VUE_APP_LOCAL_API2 + '/api/Area/updateAvatar',
method: "post",
data: formData1,
}).then(
......
......@@ -42,7 +42,8 @@
</div>
</el-form-item>
<div style="text-align:right;font-size:13px;color:#46A6FF;">
<a href="/login">去登录</a>
<!-- <a href="/login">去登录</a> -->
<router-link :to="{path:'/login'}">去登录</router-link>
</div>
<el-form-item style="width:100%;" class="item-login">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin()">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment