Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
b35bb2e6fc
@ -54,9 +54,10 @@ export function Stationaction(){
|
||||
intersects1 = raycaster.intersectObjects( data.mapdata.stationstandlist.group.children[i].children);
|
||||
|
||||
if(intersects1[0]){
|
||||
console.log(data.mapdata.stationstandlist.group);
|
||||
console.log(intersects1[0]);
|
||||
console.log(data.mapdata.stationstandlist.group.children[i]);
|
||||
if(intersects1[0].object.code == data.mapdata.stationstandlist.group.children[i].code){
|
||||
if(intersects1[0].object.parent.code == data.mapdata.stationstandlist.group.children[i].code){
|
||||
return data.mapdata.stationstandlist.group.children[i];
|
||||
}
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ export function jl3dEditorLoader(mapid,scope){
|
||||
|
||||
if(data.data ){
|
||||
if(data.data.assets){
|
||||
|
||||
loadData(editmapid,data.data);
|
||||
initData(editmapid,data.data.id);
|
||||
// loadData(editmapid,data.data);
|
||||
}else{
|
||||
initData(editmapid,data.data.id);
|
||||
}
|
||||
|
@ -344,11 +344,11 @@ export function JLmap3dEdit(dom, data, mapid) {
|
||||
}
|
||||
|
||||
if(scope.editmode == "signaledit"){
|
||||
console.log("==========signal=========");
|
||||
scope.selectmodel = scope.action.signalaction.raycaster(scope,"signal");
|
||||
}
|
||||
|
||||
if(scope.editmode == "stationedit"){
|
||||
console.log("stat!!!!!!!!!!!!");
|
||||
scope.selectmodel = scope.action.stationaction.raycaster(scope);
|
||||
}
|
||||
|
||||
|
@ -176,9 +176,10 @@ export function SectionList() {
|
||||
// console.log(stationlist[i]);
|
||||
|
||||
// realstopsection.stands.push();
|
||||
for(let j=0,lenj = scope.stopsection.length;j<lenj;j++){
|
||||
for(let n=0,lenn = stationlist[i].stands.length;n<lenn;n++){
|
||||
for(let j=0,lenj = scope.stopsection.length;j<lenj;j++){
|
||||
|
||||
|
||||
for(let n=0,lenn = stationlist[i].stands.length;n<lenn;n++){
|
||||
if(scope.stopsection[j].code == stationlist[i].stands[n].section){
|
||||
let stopsection = {
|
||||
section:scope.stopsection[j],
|
||||
@ -866,16 +867,17 @@ export function SectionList() {
|
||||
shape.moveTo( 0,-2 );
|
||||
shape.lineTo( 0, 2 );
|
||||
var geometry = new THREE.ExtrudeBufferGeometry( shape, extrudeSettings );
|
||||
|
||||
var randomMaterail = new THREE.MeshLambertMaterial({
|
||||
//color:color.fromArray(colorArray)
|
||||
color:0xFFFFFF*Math.random()
|
||||
});
|
||||
|
||||
// if(newsection.standTrack == false){
|
||||
// testmesh2 = new THREE.Mesh( geometry, randomMaterail );
|
||||
// }else{
|
||||
if(newsection.standTrack == false){
|
||||
testmesh2 = new THREE.Mesh( geometry, randomMaterail );
|
||||
}else{
|
||||
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
|
||||
// }
|
||||
}
|
||||
|
||||
testmesh2.railpoint = [
|
||||
{x:newsection.railpoint[0].x,y:height,z:newsection.railpoint[0].z},
|
||||
@ -946,11 +948,11 @@ export function SectionList() {
|
||||
color:0xFFFFFF*Math.random()
|
||||
});
|
||||
|
||||
// if(newsection.standTrack == false){
|
||||
// testmesh2 = new THREE.Mesh( geometry, randomMaterail );
|
||||
// }else{
|
||||
if(newsection.standTrack == false){
|
||||
testmesh2 = new THREE.Mesh( geometry, randomMaterail );
|
||||
}else{
|
||||
testmesh2 = new THREE.Mesh( geometry, selectmaterial );
|
||||
// }
|
||||
}
|
||||
|
||||
testmesh2.railpoint = [
|
||||
{x:newsection.railpoint[0].x,y:height,z:newsection.railpoint[0].z},
|
||||
|
@ -148,10 +148,13 @@ export function StationStandList() {
|
||||
newstationmesh = assetloader.modellist[num2].mesh.clone(true);
|
||||
}
|
||||
// console.log(jlmapstanddata[j]);
|
||||
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
@ -168,6 +171,8 @@ export function StationStandList() {
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
@ -175,6 +180,7 @@ export function StationStandList() {
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
|
||||
scope.group.add(newstationmesh);
|
||||
scope.list.push(newstationstand);
|
||||
}
|
||||
|
@ -286,13 +286,13 @@ export function StationStandListN() {
|
||||
newstationstand.type = "station";
|
||||
newstationstand.num = i;
|
||||
newstationstand.stand = [];
|
||||
newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction1.screenDoorOpenStatus = "01";
|
||||
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
// newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
// newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
// newstationstand.direction1.screenDoorOpenStatus = "01";
|
||||
//
|
||||
// newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
// newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
// newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
let newstationmesh = null;
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
@ -319,18 +319,26 @@ export function StationStandListN() {
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction2.code){
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let m=0;m<newstationstand.stands.length;m++){
|
||||
console.log("====================");
|
||||
console.log(newstationstand.stands[m]);
|
||||
console.log(psddata[n]);
|
||||
if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == false){
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
m = newstationstand.stands.length;
|
||||
}
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -341,18 +349,26 @@ export function StationStandListN() {
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction1.code){
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let m=0;m<newstationstand.stands.length;m++){
|
||||
console.log("====================");
|
||||
console.log(newstationstand.stands[m]);
|
||||
console.log(psddata[n]);
|
||||
if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == true){
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
m = newstationstand.stands.length;
|
||||
}
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -270,6 +270,7 @@ class Jlmap {
|
||||
// }
|
||||
if (this.mapDevice[code]) {
|
||||
this.$painter.delete(this.mapDevice[code]);
|
||||
delete this.mapDevice[code];
|
||||
}
|
||||
if (!elem._dispose) {
|
||||
this.mapDevice[code] = deepAssign(this.mapDevice[code] || {}, oDevice);
|
||||
|
@ -516,8 +516,8 @@ export default class Switch extends Group {
|
||||
model.singleLock && this.setMonolock(); // 道岔单锁
|
||||
model.blockade && this.block(); // 道岔封锁
|
||||
model.singleLock && model.blockade && this.blockMonolock(); // 单锁&锁闭状态
|
||||
|
||||
if (!this.style.Switch.core.graphShow) {
|
||||
const path = window.location.href;
|
||||
if (!this.style.Switch.core.graphShow && !path.includes('/map/draw')) {
|
||||
this.setSectionState(this.sheltertriangle, this.model); // 处理岔芯颜色
|
||||
}
|
||||
// this.interlockingReserved(); // 联锁预留道岔
|
||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -87,6 +87,7 @@
|
||||
deep: true,
|
||||
handler: function (newVal, oldVal) {
|
||||
if (newVal != oldVal) {
|
||||
console.log(this.jlmap3dedit.selectmodel);
|
||||
this.selectmodel = this.jlmap3dedit.selectmodel;
|
||||
this.$refs.property.switchproperty();
|
||||
//console.log(this.jlmap3dedit.selectmodel);
|
||||
|
@ -130,6 +130,7 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="project === 'drts'" style="position: absolute; bottom: 50px; font-size: 20px;left: 20px;color:#3D3D3D;width: 200px;height: 150px;background: #FFF;padding: 10px;border: 5px solid #CCC;border-radius: 8px;cursor: pointer;">
|
||||
<div class="news-box" @click="goCompetitionRules('3')"><img :src="handRight" width="14" height="14" style="margin-right: 15px">“新誉杯”官方网站</div>
|
||||
<div class="news-box" @click="goCompetitionRules('2')"><img :src="handRight" width="14" height="14" style="margin-right: 15px">“新誉杯”决赛事项通知</div>
|
||||
<div class="news-box" @click="goCompetitionRules('1')"><img :src="handRight" width="14" height="14" style="margin-right: 15px">“新誉杯”竞赛规程</div>
|
||||
</div>
|
||||
@ -212,7 +213,7 @@ export default {
|
||||
versionBaseNoShow: VersionBaseNoShow,
|
||||
mainBodyNoShow: MainBodyNoShow,
|
||||
noQrcodeList: NoQrcodeList,
|
||||
expirationDate: 1607562000000,
|
||||
expirationDate: 1605488400000,
|
||||
countdown: null,
|
||||
days: [0, 0, 0],
|
||||
gameOver: false,
|
||||
@ -589,6 +590,8 @@ export default {
|
||||
window.open('https://mp.weixin.qq.com/s?__biz=MzI3NzMwODY3OQ==&mid=2247506304&idx=1&sn=77708ca228404cee2b28e131cdfb9735&chksm=eb6aade8dc1d24fe6eb9f1334aadda239f47dafc79de7d522e0f3f00e2d3ba1dd213dda6764c&xtrack=1&scene=90&subscene=93&sessionid=1598522875&clicktime=1598523062&enterid=1598523062&ascene=56&devicetype=android-29&version=3.0.27.2701&nettype=WIFI&abtest_cookie=AAACAA%3D%3D&lang=zh_CN&exportkey=AQZ2cTPSob%2B5kBDiWnKw0Js%3D&pass_ticket=12Xyhe%2BbZsC9Vuzfs0iYUUn0i%2Br5JlZiOGCxWoExuthBhnIrpkmUyjVRi6bjyA1I&wx_header=1&platform=win', '_blank');
|
||||
} else if (val === '2') {
|
||||
window.open('https://mp.weixin.qq.com/s?__biz=MzI3NzMwODY3OQ==&mid=2247506789&idx=1&sn=5b5c1e6e0ca7dc54a935f57cee4eb1a2&chksm=eb6aaf0ddc1d261ba2ba7b9bed810b12b3317d45b1a484095d13b3d7e075b091d92fc7b9afb8&mpshare=1&scene=1&srcid=0910Yd3PVFs0WjWZyumLN9Jo&sharer_sharetime=1599740490862&sharer_shareid=98d62529ea7e8d0f6fb2281f854f3ea1&version=3.0.30.2006&platform=win&rd2werd=1#wechat_redirect', '_blank');
|
||||
} else if (val === '3') {
|
||||
window.open('http://metroskills.camet.org.cn', '_blank');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,6 +332,7 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
}
|
||||
this.$refs.menuSchema.loadRunData();
|
||||
this.userRole = userRole;
|
||||
this.$store.dispatch('scriptRecord/updateBgSet', true);
|
||||
// this.$refs.chatbox.setMembers(id);
|
||||
|
@ -151,7 +151,7 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
this.memberData = [...this.treeData[0].children, ...this.treeData[1].children, ...this.treeData[2].children, ...this.treeData[3].children, ...this.treeData[4].children];
|
||||
// this.memberData = [...this.treeData[0].children, ...this.treeData[1].children, ...this.treeData[2].children, ...this.treeData[3].children, ...this.treeData[4].children];
|
||||
this.treeData[2].children = driverList;
|
||||
} else {
|
||||
this.activeTrainList = activeTrainList;
|
||||
@ -195,7 +195,6 @@ export default {
|
||||
children: result.deviceListData[4]
|
||||
}];
|
||||
this.memberData = result.lastMemberList;
|
||||
|
||||
// 设置当前角色
|
||||
const member = resp.data.find(mem=>{
|
||||
return mem.userId != '' && mem.userId != undefined;
|
||||
|
@ -45,9 +45,9 @@ export function covertMemberData (activeTrainList, resp) {
|
||||
if (activeTrainList.length > 0) {
|
||||
if (activeTrainList.includes(member.deviceCode)) {
|
||||
deviceListData[deviceTypeIndex].push(member);
|
||||
lastMemberList.push(member);
|
||||
}
|
||||
}
|
||||
lastMemberList.push(member);
|
||||
driverList.push(member);
|
||||
} else {
|
||||
deviceListData[deviceTypeIndex].push(member);
|
||||
|
@ -179,7 +179,7 @@ export default {
|
||||
return this.$store.state.user.id;
|
||||
},
|
||||
conversitionId() {
|
||||
return (this.conversitionStateMap[this.myMemberId] || {}).conversitionId;
|
||||
return (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}).conversitionId;
|
||||
},
|
||||
privateMemberList() {
|
||||
return (this.conversitionStateMap[this.myMemberId] || {privateMemberList: []}).privateMemberList;
|
||||
@ -203,6 +203,9 @@ export default {
|
||||
userRole(val) {
|
||||
if (val === 'AUDIENCE') {
|
||||
this.goCommonConversation();
|
||||
this.myMemberId = '';
|
||||
} else {
|
||||
this.myMemberId = (this.simulationUsers[this.userId] || {}).memberId;
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount':function(val) {
|
||||
@ -285,7 +288,7 @@ export default {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.type) {
|
||||
case 'DISPATCHER':
|
||||
this.memberData[item.id].label = '行调' + (dispatcherList.length + 1);
|
||||
this.memberData[item.id].label = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
@ -304,7 +307,7 @@ export default {
|
||||
driverList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
this.memberData[item.id].label = '通号' + (maintainerList.length + 1);
|
||||
this.memberData[item.id].label = '通号' + (item.name || '');
|
||||
maintainerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
}
|
||||
@ -500,6 +503,9 @@ export default {
|
||||
if (memberList && memberList.length) {
|
||||
memberList.forEach(memberId => {
|
||||
const member = this.memberData[memberId];
|
||||
if (member && member.type === 'DRIVER' && !this.activeTrains.includes(member.deviceCode)) {
|
||||
return;
|
||||
}
|
||||
if (member && member.userId) {
|
||||
this.memberIdList.push(member.id);
|
||||
this.userString += ((this.userString ? ',' : '') + member.label + '(' + this.simulationUsers[member.userId].nickName + ')');
|
||||
|
@ -19,6 +19,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仿真成员名称:" prop="name">
|
||||
<el-input v-model="formModel.name" size="small" placeholder="请输入成员名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
@ -35,7 +38,8 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
type: ''
|
||||
type: '',
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
type: [
|
||||
|
@ -158,7 +158,7 @@ export default {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
switch (item.type) {
|
||||
case 'DISPATCHER':
|
||||
this.memberData[item.id].label = '行调' + (dispatcherList.length + 1);
|
||||
this.memberData[item.id].label = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
@ -176,7 +176,7 @@ export default {
|
||||
driverList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'MAINTAINER':
|
||||
this.memberData[item.id].label = '通号' + (maintainerList.length + 1);
|
||||
this.memberData[item.id].label = '通号' + (item.name || '');
|
||||
maintainerList.push(this.memberData[item.id]);
|
||||
break;
|
||||
}
|
||||
@ -276,7 +276,7 @@ export default {
|
||||
driverNoShow = false;
|
||||
}
|
||||
return (data.label.indexOf(value) !== -1 || flag) && driverNoShow;
|
||||
},
|
||||
}
|
||||
// handlerMemberOnOff(data) {
|
||||
// this.$store.dispatch('training/updateMemberAndUser', { simulationUserList: data, userId: this.userId });
|
||||
// }
|
||||
|
@ -153,7 +153,8 @@ export default {
|
||||
}
|
||||
return rtn;
|
||||
},
|
||||
changeSectionAttr() { // 修改区段属性
|
||||
// 修改区段属性
|
||||
changeSectionAttr() {
|
||||
const changeSectionList = []; // 改变的区段列表
|
||||
this.sectionList.forEach(section => {
|
||||
const oneSection = section.points[section.points.length - 1];
|
||||
@ -244,45 +245,45 @@ export default {
|
||||
const sectionb = this.findSectionData(sectionLists, elem.sectionBCode);
|
||||
const sectiona = this.findSectionData(sectionLists, elem.sectionACode);
|
||||
const sectionc = this.findSectionData(sectionLists, elem.sectionCCode);
|
||||
const parentSectionModel = this.$store.getters['map/getDeviceByCode'](sectiona.parentCode);
|
||||
if (!parentSectionModel) { // 找不到父元素删除
|
||||
if (switchSectionList.indexOf(elem.code) == -1) {
|
||||
let uid;
|
||||
if (!elem['uid']) {
|
||||
uid = getUID('T', [...this.sectionList, ...addSectionList]);
|
||||
elem['uid'] = uid;
|
||||
}
|
||||
addSectionList.push({ code: elem.uid });
|
||||
sectiona.parentCode = elem['uid'];
|
||||
sectionb.parentCode = elem['uid'];
|
||||
sectionc.parentCode = elem['uid'];
|
||||
elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode];
|
||||
sectionList.push(elem);
|
||||
switchList.forEach(ele => {
|
||||
const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode);
|
||||
const sectionc1 = this.findSectionData(sectionLists, ele.sectionCCode);
|
||||
const sectionb1 = this.findSectionData(sectionLists, ele.sectionBCode);
|
||||
if (sectionb1.points[sectionb1.points.length - 1].x == sectionb.points[0].x && sectionb1.points[sectionb1.points.length - 1].y == sectionb.points[0].y) {
|
||||
ele['uid'] = uid;
|
||||
elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode, ele.sectionACode, ele.sectionBCode, ele.sectionCCode];
|
||||
sectiona1.parentCode = uid;
|
||||
sectionb1.parentCode = uid;
|
||||
sectionc1.parentCode = uid;
|
||||
switchSectionList.push(ele.code);
|
||||
sectionList.forEach((item, index) => {
|
||||
if (item.code == ele.code) {
|
||||
sectionList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// const parentSectionModel = this.$store.getters['map/getDeviceByCode'](sectiona.parentCode);
|
||||
// if (!parentSectionModel) { // 找不到父元素删除
|
||||
if (switchSectionList.indexOf(elem.code) == -1) {
|
||||
let uid;
|
||||
if (!elem['uid']) {
|
||||
uid = getUID('T', [...this.sectionList, ...addSectionList]);
|
||||
elem['uid'] = uid;
|
||||
}
|
||||
} else {
|
||||
parentSectionModel.relevanceSectionList.push(elem.sectionACode);
|
||||
parentSectionModel.relevanceSectionList.push(elem.sectionBCode);
|
||||
parentSectionModel.relevanceSectionList.push(elem.sectionCCode);
|
||||
models.push(parentSectionModel);
|
||||
addSectionList.push({ code: elem.uid });
|
||||
sectiona.parentCode = elem['uid'];
|
||||
sectionb.parentCode = elem['uid'];
|
||||
sectionc.parentCode = elem['uid'];
|
||||
elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode];
|
||||
sectionList.push(elem);
|
||||
switchList.forEach(ele => {
|
||||
const sectiona1 = this.findSectionData(sectionLists, ele.sectionACode);
|
||||
const sectionc1 = this.findSectionData(sectionLists, ele.sectionCCode);
|
||||
const sectionb1 = this.findSectionData(sectionLists, ele.sectionBCode);
|
||||
if (sectionb1.points[sectionb1.points.length - 1].x == sectionb.points[0].x && sectionb1.points[sectionb1.points.length - 1].y == sectionb.points[0].y) {
|
||||
ele['uid'] = uid;
|
||||
elem['relevanceSectionList'] = [elem.sectionACode, elem.sectionBCode, elem.sectionCCode, ele.sectionACode, ele.sectionBCode, ele.sectionCCode];
|
||||
sectiona1.parentCode = uid;
|
||||
sectionb1.parentCode = uid;
|
||||
sectionc1.parentCode = uid;
|
||||
switchSectionList.push(ele.code);
|
||||
sectionList.forEach((item, index) => {
|
||||
if (item.code == ele.code) {
|
||||
sectionList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// } else {
|
||||
// parentSectionModel.relevanceSectionList.push(elem.sectionACode);
|
||||
// parentSectionModel.relevanceSectionList.push(elem.sectionBCode);
|
||||
// parentSectionModel.relevanceSectionList.push(elem.sectionCCode);
|
||||
// models.push(parentSectionModel);
|
||||
// }
|
||||
sectiona.relSwitchCode = elem.code;
|
||||
sectionb.relSwitchCode = elem.code;
|
||||
sectionc.relSwitchCode = elem.code;
|
||||
|
Loading…
Reference in New Issue
Block a user