This commit is contained in:
fan 2020-04-22 14:32:00 +08:00
commit c3ca6de6d8
6 changed files with 38 additions and 23 deletions

View File

@ -140,10 +140,10 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
// controls3.getObject().rotation.x = Math.PI/2;
scene.add(controls3.getObject());
let cameracctv = new THREE.PerspectiveCamera(60, dom.clientWidth/dom.clientHeight, 1, 40);
cameracctv.position.set( 2, -1,27 );
let cameracctv = new THREE.PerspectiveCamera(50, dom.clientWidth/dom.clientHeight, 1, 10);
cameracctv.position.set( 0, -1,30 );
cameracctv.rotation.y = Math.PI/2;
// cameracctv.rotation.y = Math.PI/2;
camera.add(cameracctv);

View File

@ -53,6 +53,8 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
let camera = SetCamera(dom);
//定义场景(渲染容器)
let scene = SetScene(project);
let scenesimulation = new THREE.Group();
scene.add(scenesimulation);
//定义镜头操作
let controls = new THREE.OrbitControls(camera);
controls.maxPolarAngle = Math.PI/2;
@ -110,14 +112,14 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
scope.jsonwebwork = new Worker("../../static/workertest/jsonworker.js");
scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scene,storemod);
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}else{
scope.datatype = "new";
scope.jsonwebworknew = new Worker("../../static/workertest/jsonworkernew.js");
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
scope.Subscribe.socketon(scope.Subscribe.topic);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scene,storemod);
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
}
});
@ -187,12 +189,12 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
scope.webwork.onmessage = function (event) {
//更新列车位置
// if(scope.datatype == "new"){
//
// UpdateTrainNew(camera,trainlisttest);
// }else{
// UpdateTrain(camera,trainlisttest);
// }
if(scope.datatype == "new"){
UpdateTrainNew(camera,trainlisttest);
}else{
UpdateTrain(camera,trainlisttest);
}
if(camerarail.moveswitch == true){
// console.log(camerarail.progress);

View File

@ -6,6 +6,7 @@ import { MessageBox } from 'element-ui';
import { getToken } from '@/utils/auth';
import { getBaseUrl } from '@/utils/baseUrl';
import { EventBus } from '@/scripts/event-bus';
import Vue from 'vue';
const BASE_API = getBaseUrl();
@ -61,8 +62,15 @@ service.interceptors.response.use(
});
});
});
} else {
Vue.prototype.$alert('<strong>服务异常: <i style="color: red;">' + res.message + '</i></strong>', '请求结果', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
closeOnClickModal: false
}).then(() => {
return Promise.reject(res);
});
}
return Promise.reject(res);
} else {
return response.data;
}

View File

@ -229,7 +229,7 @@ export default {
deleteObj() {
this.doClose();
const _that = this;
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
this.$confirm('是否确认删除 “' + this.editModel.name + '" ' + ' ', this.$t('tip.hint'), {
confirmButtonText: this.$t('map.confirm'),
cancelButtonText: this.$t('map.cancel'),
type: 'warning'

View File

@ -227,9 +227,11 @@ export default {
} else {
importRunPlan({ mapId: that.$route.params.mapId || '02', runPlanList: jsonData }).then(response => {
that.loadingDig.close();
that.$message.success(that.$t('tip.importOperationGraphSuccessfully'));
that.$emit('refresh');
if (response && response.code == 200) {
that.$message.success(that.$t('tip.importOperationGraphSuccessfully'));
that.$emit('refresh');
// this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} });
}
}).catch(error => {
that.loadingDig.close();
that.$message.warning(`${that.$t('tip.importRunGraphFailed')} ${error.message}`);

View File

@ -311,14 +311,17 @@ export default {
});
});
},
async handleSimulationCheck(index, row) {
const res = await simulationCheck(row.id);
if (!res.data.length) {
this.$message.success(this.$t('publish.simulationDataIsValidated'));
return;
}
this.tableToExcel(res.data);
this.$messageBox(this.$t('tip.dataValidationFailed'));
handleSimulationCheck(index, row) {
simulationCheck(row.id).then(res=>{
if (!res.data.length) {
this.$message.success(this.$t('publish.simulationDataIsValidated'));
return;
}
this.tableToExcel(res.data);
this.$messageBox(this.$t('tip.dataValidationFailed'));
}).catch(error=>{
this.$messageBox(this.$t('tip.dataValidationFailed') + error.message);
});
},
tableToExcel(data) {
const filterVal = ['index'];