Commit 2bbf1993 authored by caicaicai's avatar caicaicai

修改

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