Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e4a98283cc
@ -161,9 +161,9 @@ export function StationStandList() {
|
||||
}
|
||||
this.loadpromise = function(jlmap3ddata,standsdata,jlmapstanddata,scene,assetloader){
|
||||
return new Promise(function(resolve, reject){
|
||||
console.log(jlmap3ddata);
|
||||
console.log(standsdata);
|
||||
console.log(jlmapstanddata);
|
||||
// console.log(jlmap3ddata);
|
||||
// console.log(standsdata);
|
||||
// console.log(jlmapstanddata);
|
||||
let stations = jlmap3ddata.stationstandlist.list;
|
||||
let num;
|
||||
let num2;
|
||||
|
@ -93,7 +93,6 @@ export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegr
|
||||
|
||||
for(let i=0,leni = data.body.length;i<leni;i++){
|
||||
if(data.body[i].section == jl3dpass.nowstation.topsection){
|
||||
console.log(data.body[i]);
|
||||
if(toptrain.nowcode != data.body[i].code){
|
||||
toptrain.nowcode = data.body[i].code;
|
||||
}
|
||||
|
@ -412,7 +412,6 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
let socktest = null;
|
||||
|
||||
getPublish3dMapDetail(skinCode).then(netdata3d => {
|
||||
console.log(JSON.parse(netdata3d.data.assets).cctvAssetList);
|
||||
this.modelmanager.loadpromise(JSON.parse(netdata3d.data.assets).cctvAssetList, scope.mixers).then(function (data) {
|
||||
// console.log(scope.modelmanager);
|
||||
initstationanimation(scope.modelmanager.station.mesh);
|
||||
@ -652,33 +651,34 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||
};
|
||||
stationwebwork.onmessage = function (event) {
|
||||
if(aiswitch == 0){
|
||||
let direct = Math.floor(Math.random()*(3-1+1))+1;
|
||||
//1--top
|
||||
//2-- down
|
||||
if(direct == 1){
|
||||
newhumancreate(stationzon.getzoneposition("enter1"),0);
|
||||
}else{
|
||||
newhumancreate(stationzon.getzoneposition("enter2"),0);
|
||||
}
|
||||
|
||||
if(toppasseron){
|
||||
for(let i=0,leni=stationzon.list["standtop"].doorpoints.length;i<leni;i++ ){
|
||||
setTimeout(function(){
|
||||
newhumancreate(stationzon.list["standtop"].doorpoints[i],5,"top",i);
|
||||
}, Math.random()*1000);
|
||||
|
||||
// console.log(humanlist.children.length);
|
||||
if(humanlist.children.length < 80){
|
||||
let direct = Math.floor(Math.random()*(3-1+1))+1;
|
||||
//1--top
|
||||
//2-- down
|
||||
if(direct == 1){
|
||||
newhumancreate(stationzon.getzoneposition("enter1"),0);
|
||||
}else{
|
||||
newhumancreate(stationzon.getzoneposition("enter2"),0);
|
||||
}
|
||||
}
|
||||
if(downpasseron){
|
||||
if(toppasseron){
|
||||
for(let i=0,leni=stationzon.list["standtop"].doorpoints.length;i<leni;i++ ){
|
||||
setTimeout(function(){
|
||||
newhumancreate(stationzon.list["standtop"].doorpoints[i],5,"top",i);
|
||||
}, Math.random()*1000);
|
||||
|
||||
for(let i=0,leni=stationzon.list["standdown"].doorpoints.length;i<leni;i++ ){
|
||||
setTimeout(function(){
|
||||
newhumancreate(stationzon.list["standdown"].doorpoints[i],5,"down",i);
|
||||
}, Math.random()*1000);
|
||||
}
|
||||
}
|
||||
if(downpasseron){
|
||||
|
||||
for(let i=0,leni=stationzon.list["standdown"].doorpoints.length;i<leni;i++ ){
|
||||
setTimeout(function(){
|
||||
newhumancreate(stationzon.list["standdown"].doorpoints[i],5,"down",i);
|
||||
}, Math.random()*1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,6 @@ export function ModelManager(){
|
||||
|
||||
this.loadpromise = function (data,mixers){
|
||||
let initlist = [];
|
||||
console.log(data);
|
||||
for(let i=0,leni=data.length;i<leni;i++){
|
||||
if(data[i].type == "man1" || data[i].type == "cctvMan1"){
|
||||
|
||||
@ -121,7 +120,6 @@ function fbxpromise(asset,mixers,model){
|
||||
// child.receiveShadow = true;
|
||||
// }
|
||||
// } );
|
||||
console.log(asset);
|
||||
if(asset.type == "cctvTrain"){
|
||||
// let mixer = new THREE.AnimationMixer( object );
|
||||
let realtrain = new THREE.Group();
|
||||
|
@ -47,6 +47,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
|
||||
function initnew3d(data,netdata){
|
||||
// console.log(JSON.parse(netdata.assets));
|
||||
console.log(JSON.parse(netdata.assets));
|
||||
Materialload(scope,JSON.parse(netdata.assets).stationTextureList[0]);
|
||||
let mapdata = data;
|
||||
//初始化轨道和道岔
|
||||
|
@ -10,14 +10,13 @@
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="make" :form="makeForm" :form-model="addModel" :rules="rules" />
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="makeForm"
|
||||
:add-model="addModel"
|
||||
:create-rules="rules"
|
||||
@create="create"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
@ -26,7 +25,7 @@
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConfigList from './config/list';
|
||||
import CreateOperate from './components/createOperate';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
@ -35,7 +34,7 @@ export default {
|
||||
name: 'StationStandDraft',
|
||||
components: {
|
||||
OperateProperty,
|
||||
ConfigList
|
||||
CreateOperate
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -164,19 +163,15 @@ export default {
|
||||
this.editModel.points.splice(index + 1, 0);
|
||||
},
|
||||
create() {
|
||||
this.$refs['make'].validate((valid) => {
|
||||
if (valid) {
|
||||
const model = {
|
||||
_type: 'OutFrame',
|
||||
code: getUID('OutFrame', this.outerFrameList),
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height,
|
||||
position: this.addModel.position,
|
||||
showConditions:this.addModel.showConditions
|
||||
};
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
const model = {
|
||||
_type: 'OutFrame',
|
||||
code: getUID('OutFrame', this.outerFrameList),
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height,
|
||||
position: this.addModel.position,
|
||||
showConditions:this.addModel.showConditions
|
||||
};
|
||||
this.$emit('updateMapModel', model);
|
||||
},
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
|
@ -12,14 +12,13 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="make" :form="addForm" :form-model="addModel" :rules="createRules" />
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="addForm"
|
||||
:add-model="addModel"
|
||||
:create-rules="createRules"
|
||||
@create="create"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three" :lazy="lazy">
|
||||
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
|
||||
@ -42,6 +41,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import CreateOperate from './components/createOperate';
|
||||
import ConfigList from './config/list';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import getModel from './models.js';
|
||||
@ -49,6 +49,7 @@ import getModel from './models.js';
|
||||
export default {
|
||||
name: 'StationStandDraft',
|
||||
components: {
|
||||
CreateOperate,
|
||||
ConfigList
|
||||
},
|
||||
props: {
|
||||
@ -314,69 +315,65 @@ export default {
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const models = [];
|
||||
const space = this.$store.state.map.map.skinVO.code == '07' ? 0 : 8;
|
||||
const Standuid = getUID('PF', this.stationStandList);
|
||||
const stationStandModel = getModel('StationStand');
|
||||
const data = {
|
||||
code: Standuid,
|
||||
name: `PF${this.stationStandList.length + 1}`,
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height,
|
||||
deviceStationCode: this.getDeviceStationCode(this.addModel.stationCode),
|
||||
position: {
|
||||
x: 0,
|
||||
y: this.addModel.pointY
|
||||
},
|
||||
standTrackCode: this.addModel.standTrackCode,
|
||||
right: this.addModel.right,
|
||||
small: this.addModel.small
|
||||
};
|
||||
const model = Object.assign(stationStandModel, data);
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.code == this.addModel.stationCode) {
|
||||
model.stationCode = elem.code;
|
||||
}
|
||||
});
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](this.addModel.standTrackCode));
|
||||
model.position.x = Math.abs(section.points[section.points.length - 1].x - section.points[0].x) / 2 + section.points[0].x;
|
||||
models.push(model);
|
||||
if (!this.addModel.small) {
|
||||
const uid = getUID('Psd', this.psdList);
|
||||
const param = {
|
||||
_type: 'Psd',
|
||||
code: uid,
|
||||
name: `Psd${this.psdList.length + 1}`,
|
||||
width: this.addModel.width,
|
||||
height: this.$store.state.map.map.skinVO.code == '07' ? this.addModel.height : 3,
|
||||
standCode: Standuid, // 关联站台唯一code
|
||||
position: {
|
||||
x: models[0].position.x,
|
||||
y: this.addModel.pointY - (this.addModel.height / 2) - space
|
||||
}
|
||||
};
|
||||
if (this.addModel.stationstandDirection == '01') { // 朝下
|
||||
param.position.y = this.addModel.pointY + (this.addModel.height / 2) + space;
|
||||
}
|
||||
if (this.$store.state.map.map.skinVO.code == '07') {
|
||||
param.position.y = this.addModel.pointY;
|
||||
}
|
||||
models.push(param);
|
||||
const espUid = getUID('Esp', this.espList); // 创建紧急停车按钮
|
||||
models.push({
|
||||
_type: 'Esp',
|
||||
code: espUid,
|
||||
name: `Esp${this.espList.length + 1}`,
|
||||
standCode: Standuid
|
||||
});
|
||||
}
|
||||
section.standTrack = !this.addModel.small;
|
||||
models.push(section);
|
||||
this.$emit('updateMapModel', models);
|
||||
const models = [];
|
||||
const space = this.$store.state.map.map.skinVO.code == '07' ? 0 : 8;
|
||||
const Standuid = getUID('PF', this.stationStandList);
|
||||
const stationStandModel = getModel('StationStand');
|
||||
const data = {
|
||||
code: Standuid,
|
||||
name: `PF${this.stationStandList.length + 1}`,
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height,
|
||||
deviceStationCode: this.getDeviceStationCode(this.addModel.stationCode),
|
||||
position: {
|
||||
x: 0,
|
||||
y: this.addModel.pointY
|
||||
},
|
||||
standTrackCode: this.addModel.standTrackCode,
|
||||
right: this.addModel.right,
|
||||
small: this.addModel.small
|
||||
};
|
||||
const model = Object.assign(stationStandModel, data);
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.code == this.addModel.stationCode) {
|
||||
model.stationCode = elem.code;
|
||||
}
|
||||
});
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](this.addModel.standTrackCode));
|
||||
model.position.x = Math.abs(section.points[section.points.length - 1].x - section.points[0].x) / 2 + section.points[0].x;
|
||||
models.push(model);
|
||||
if (!this.addModel.small) {
|
||||
const uid = getUID('Psd', this.psdList);
|
||||
const param = {
|
||||
_type: 'Psd',
|
||||
code: uid,
|
||||
name: `Psd${this.psdList.length + 1}`,
|
||||
width: this.addModel.width,
|
||||
height: this.$store.state.map.map.skinVO.code == '07' ? this.addModel.height : 3,
|
||||
standCode: Standuid, // 关联站台唯一code
|
||||
position: {
|
||||
x: models[0].position.x,
|
||||
y: this.addModel.pointY - (this.addModel.height / 2) - space
|
||||
}
|
||||
};
|
||||
if (this.addModel.stationstandDirection == '01') { // 朝下
|
||||
param.position.y = this.addModel.pointY + (this.addModel.height / 2) + space;
|
||||
}
|
||||
if (this.$store.state.map.map.skinVO.code == '07') {
|
||||
param.position.y = this.addModel.pointY;
|
||||
}
|
||||
models.push(param);
|
||||
const espUid = getUID('Esp', this.espList); // 创建紧急停车按钮
|
||||
models.push({
|
||||
_type: 'Esp',
|
||||
code: espUid,
|
||||
name: `Esp${this.espList.length + 1}`,
|
||||
standCode: Standuid
|
||||
});
|
||||
}
|
||||
section.standTrack = !this.addModel.small;
|
||||
models.push(section);
|
||||
this.$emit('updateMapModel', models);
|
||||
},
|
||||
getDeviceStationCode(stationCode) {
|
||||
// 创建新站台的时候,判断该站台对应的车站是否集中站,如果不是集中站,判断该车站是否被控制
|
||||
|
Loading…
Reference in New Issue
Block a user