剧本预览代码调整

绘图高级页面代码调整
This commit is contained in:
joylink_cuiweidong 2020-07-14 18:21:40 +08:00
parent 28261153df
commit f9f58a70c4
3 changed files with 32 additions and 67 deletions

View File

@ -209,7 +209,6 @@ export default {
try { try {
let res; let res;
if (this.isDesignPlatform) { if (this.isDesignPlatform) {
debugger;
res = this.drawWay ? await loadDraftScriptNew(id, this.group) : await loadDraftScript(row.id, id, this.group); res = this.drawWay ? await loadDraftScriptNew(id, this.group) : await loadDraftScript(row.id, id, this.group);
} else { } else {
res = await loadScriptNew(row.id, id, this.group); res = await loadScriptNew(row.id, id, this.group);

View File

@ -191,6 +191,17 @@ export default {
} }
}); });
}, },
'$store.state.socket.createConversition':function(val) {
const memberList = [];
val.memberIds.forEach(id=>{
if (val.creatorId == id) {
memberList.push({memberId:id, connect:true});
} else {
memberList.push({memberId:id, connect:false});
}
});
this.conversitionMemberList = memberList;
},
'$store.state.map.activeTrainListChange': function (val) { // '$store.state.map.activeTrainListChange': function (val) { //
this.activeTrains = []; this.activeTrains = [];
const activeTrainList = this.$store.state.map.activeTrainList; const activeTrainList = this.$store.state.map.activeTrainList;
@ -323,7 +334,7 @@ export default {
this.createLoading = true; this.createLoading = true;
startConversition(this.group, this.memberIdList).then(resp => { startConversition(this.group, this.memberIdList).then(resp => {
this.conversitionId = resp.data.id; this.conversitionId = resp.data.id;
this.conversitionMemberList = resp.data.memberList; // this.conversitionMemberList = resp.data.memberList;
this.messageList = []; this.messageList = [];
this.userString = ''; this.userString = '';
this.isConversitionCreator = true; this.isConversitionCreator = true;

View File

@ -13,67 +13,12 @@
<el-button type="text" class="mapEdit_box" @click="showMap">{{ $t('map.viewLayer') }}</el-button> <el-button type="text" class="mapEdit_box" @click="showMap">{{ $t('map.viewLayer') }}</el-button>
</div> </div>
<el-tabs v-model="enabledTab" type="card" class="map_card" :before-leave="tabBeforeLeave" @tab-click="changePane"> <el-tabs v-model="enabledTab" type="card" class="map_card" :before-leave="tabBeforeLeave" @tab-click="changePane">
<el-tab-pane :label="$t('map.routeID')" class="tab_pane_box" name="route" :lazy="lazy"> <el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
<route-operate <component
ref="routeOperate" :is="each.menus"
:map-info="mapInfo" :ref="enabledTabMenu[each.name]"
:selected="selected" :selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="侧防" class="tab_pane_box" name="flankProtect" :lazy="lazy">
<flank-protect-operate
ref="flankProtectOperate"
:map-info="mapInfo" :map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="自动折返" class="tab_pane_box" name="turned" :lazy="lazy">
<turned-operate
ref="turnedOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.automaticSignal')" class="tab_pane_box" name="automatic" :lazy="lazy">
<automatic-operate
ref="automaticOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.signalApprochSection')" class="tab_pane_box" name="signal" :lazy="lazy">
<signal-operate
ref="signalOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane :label="$t('map.routing')" class="tab_pane_box" name="routing" :lazy="lazy">
<routing-operate
ref="routingOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="停站时间" class="tab_pane_box" name="dwellTime" :lazy="lazy">
<dwell-time-operate
ref="dwellTimeOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="设置运行等级" class="tab_pane_box" name="runLevel" :lazy="lazy">
<run-level-operate
ref="runLevelOperate"
:map-info="mapInfo"
:selected="selected"
@setCenter="setCenter" @setCenter="setCenter"
/> />
</el-tab-pane> </el-tab-pane>
@ -124,6 +69,16 @@ export default {
enabledTab: 'route', enabledTab: 'route',
oldDevice: null, oldDevice: null,
lazy: true, lazy: true,
tabList:[
{label:this.$t('map.routeID'), name:'route', menus:RouteOperate},
{label:'侧防', name:'flankProtect', menus:FlankProtectOperate},
{label:'自动折返', name:'turned', menus:TurnedOperate},
{label:this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
{label:this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate},
{label:this.$t('map.routing'), name:'routing', menus:RoutingOperate},
{label:'停站时间', name:'dwellTime', menus:DwellTimeOperate},
{label:'设置运行等级', name:'runLevel', menus:RunLevelOperate}
],
enabledTabMenu: { enabledTabMenu: {
route: 'routeOperate', route: 'routeOperate',
routing: 'routingOperate', routing: 'routingOperate',
@ -145,21 +100,21 @@ export default {
}, },
initLoad() { initLoad() {
if (this.enabledTab === 'route') { if (this.enabledTab === 'route') {
this.$refs[this.enabledTabMenu[this.enabledTab]].initLoad(); this.$refs[this.enabledTabMenu[this.enabledTab]][0].initLoad();
} }
this.tabBeforeLeave(this.enabledTab); this.tabBeforeLeave(this.enabledTab);
}, },
createRouteEvent() { // createRouteEvent() { //
this.$refs[this.enabledTabMenu[this.enabledTab]].createRouteEvent(); this.$refs[this.enabledTabMenu[this.enabledTab]][0].createRouteEvent();
}, },
previewRouteEvent() { // previewRouteEvent() { //
this.$refs[this.enabledTabMenu[this.enabledTab]].previewRouteEvent(); this.$refs[this.enabledTabMenu[this.enabledTab]][0].previewRouteEvent();
}, },
changePane(data) { changePane(data) {
this.enabledTab = data.name; this.enabledTab = data.name;
}, },
setSelected(selected) { setSelected(selected) {
this.$refs[this.enabledTabMenu[this.enabledTab]].setSelected(selected); this.$refs[this.enabledTabMenu[this.enabledTab]][0].setSelected(selected);
}, },
setCenter(code) { setCenter(code) {
this.$emit('setCenter', code); this.$emit('setCenter', code);
@ -170,11 +125,11 @@ export default {
}, },
tabBeforeLeave(activeName, oldActiveName) { tabBeforeLeave(activeName, oldActiveName) {
if (oldActiveName === 'route' || oldActiveName === 'signal' || oldActiveName == 'runLevel' || oldActiveName == 'routing') { if (oldActiveName === 'route' || oldActiveName === 'signal' || oldActiveName == 'runLevel' || oldActiveName == 'routing') {
this.$refs[this.enabledTabMenu[oldActiveName]].batchSectionListFocus(false); this.$refs[this.enabledTabMenu[oldActiveName]][0].batchSectionListFocus(false);
} }
if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel' || activeName == 'routing') { if (activeName === 'route' || activeName === 'signal' || activeName == 'runLevel' || activeName == 'routing') {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs[this.enabledTabMenu[activeName]].batchSectionListFocus(true); this.$refs[this.enabledTabMenu[activeName]][0].batchSectionListFocus(true);
}); });
} }
} }