剧本预览代码调整
新版地图绘制代码优化
This commit is contained in:
parent
1add21a740
commit
d9ed44b218
@ -30,13 +30,13 @@
|
||||
<div>
|
||||
<el-form ref="ruleForm" :model="form" label-width="50px">
|
||||
<el-form-item :label="$t('display.script.role')" prop="role">
|
||||
<el-select v-model="form.role" :placeholder="$t('display.script.pleaseSelect')">
|
||||
<el-select v-model="form.type" :placeholder="$t('display.script.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in memberList"
|
||||
:key="item.id"
|
||||
:label="(roleConfig[item.role]?roleConfig[item.role]: '')+(item.name?item.name: '')"
|
||||
:label="(roleConfig[item.type]?roleConfig[item.type]: '')+(item.name?item.name: '')"
|
||||
:value="item.id"
|
||||
:disabled="checkDisabled(item.role)"
|
||||
:disabled="checkDisabled(item.type)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
},
|
||||
row: {},
|
||||
form: {
|
||||
role: ''
|
||||
type: ''
|
||||
},
|
||||
memberList: [],
|
||||
mapLocation:null,
|
||||
@ -229,8 +229,8 @@ export default {
|
||||
},
|
||||
|
||||
confirm() {
|
||||
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; });
|
||||
this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
|
||||
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.type; });
|
||||
this.$emit('selectQuest', this.row, this.form.type, this.mapLocation, roleName.type);
|
||||
this.doClose();
|
||||
this.roleDoClose();
|
||||
},
|
||||
@ -260,7 +260,7 @@ export default {
|
||||
},
|
||||
|
||||
handleName(item) {
|
||||
return this.roleConfig[item.role] ? this.roleConfig[item.role] : '' + (item.name ? item.name : '');
|
||||
return this.roleConfig[item.type] ? this.roleConfig[item.type] : '' + (item.name ? item.name : '');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -128,7 +128,7 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('standStationCode', this.field);
|
||||
this.$emit('espCode', this.field);
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
this.addModel.standCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
this.$emit('espCode', '');
|
||||
}
|
||||
},
|
||||
hasPSD(data) {
|
||||
|
@ -21,183 +21,24 @@
|
||||
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">绘图显隐</el-button>
|
||||
</div>
|
||||
<el-tabs v-show="projectType" v-model="enabledTab" class="mapEdit" type="card">
|
||||
<el-tab-pane :label="$t('map.section')" class="tab_pane_box" name="Section" :lazy="lazy">
|
||||
<section-draft
|
||||
ref="Section"
|
||||
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
|
||||
<component
|
||||
:is="each.menus"
|
||||
:ref="each.name"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@fieldSelect="fieldSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.switch')" class="tab_pane_box" name="Switch" :lazy="lazy">
|
||||
<switch-draft
|
||||
ref="Switch"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@fieldSelectSwitchSection="fieldSelectSwitchSection"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.station')" class="tab_pane_box" name="Station" :lazy="lazy">
|
||||
<station-draft
|
||||
ref="Station"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@stationSectionCode="stationEnabledTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.signal')" class="tab_pane_box" name="Signal" :lazy="lazy">
|
||||
<signal-draft
|
||||
ref="Signal"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@signalSectionCode="selectEnabledTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.platform')" class="tab_pane_box" name="StationStand" :lazy="lazy">
|
||||
<station-stand-draft
|
||||
ref="StationStand"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@standStationCode="standStationTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.psd')" class="tab_pane_box" name="Psd" :lazy="lazy">
|
||||
<psd-draft
|
||||
ref="Psd"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@standStationCode="psdTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.platformEmergencyStop')" class="tab_pane_box" name="Esp" :lazy="lazy">
|
||||
<esp-draft
|
||||
ref="Esp"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@standStationCode="esqTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.trainWindow')" class="tab_pane_box" name="TrainWindow" :lazy="lazy">
|
||||
<train-window-draft
|
||||
ref="TrainWindow"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.zcZoneControl')" class="tab_pane_box" name="ZcControl" :lazy="lazy">
|
||||
<zc-control-draft
|
||||
ref="ZcControl"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.functionButton')" class="tab_pane_box" name="ControlDraft" :lazy="lazy">
|
||||
<control-draft
|
||||
ref="ControlDraft"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@selectFiled="selectFiled"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.saidLamp')" class="tab_pane_box" name="ControlLamp" :lazy="lazy">
|
||||
<control-lamp
|
||||
ref="ControlLamp"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@psdCode="psdTab"
|
||||
@espCode="esqTab"
|
||||
@saidLampHover="saidLampTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train" :lazy="lazy">
|
||||
<train-draft
|
||||
ref="Train"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.line')" class="tab_pane_box" name="Line" :lazy="lazy">
|
||||
<line-draft
|
||||
ref="Line"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="供电线" class="tab_pane_box" name="Power" :lazy="lazy">
|
||||
<power-draft
|
||||
ref="Power"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.text')" class="tab_pane_box" name="Text" :lazy="lazy">
|
||||
<text-draft
|
||||
ref="Text"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.lcControl')" class="tab_pane_box" name="LcControl" :lazy="lazy">
|
||||
<lc-control-draft
|
||||
ref="LcControl"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.rectangularBox')" class="tab_pane_box" name="OutFrame" :lazy="lazy">
|
||||
<out-frame-draft
|
||||
ref="OutFrame"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.image')" class="tab_pane_box" name="Resource" :lazy="lazy">
|
||||
<Image-control-draft
|
||||
ref="Resource"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.boundingBox')" class="tab_pane_box" name="CheckBox" :lazy="lazy">
|
||||
<checkbox-draft
|
||||
ref="CheckBox"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="站间分隔" class="tab_pane_box" name="SplitStation" :lazy="lazy">
|
||||
<split-station
|
||||
ref="SplitStation"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="箭头" class="tab_pane_box" name="Arrow" :lazy="lazy">
|
||||
<arrow
|
||||
ref="Arrow"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template v-show="!projectType">
|
||||
<split-screen
|
||||
@ -280,6 +121,29 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
lazy: true,
|
||||
tabList:[
|
||||
{label:this.$t('map.section'), name:'Section', menus:SectionDraft},
|
||||
{label:this.$t('map.switch'), name:'Switch', menus:SwitchDraft},
|
||||
{label:this.$t('map.station'), name:'Station', menus:StationDraft},
|
||||
{label:this.$t('map.signal'), name:'Signal', menus:SignalDraft},
|
||||
{label:this.$t('map.platform'), name:'StationStand', menus:StationStandDraft},
|
||||
{label:this.$t('map.psd'), name:'Psd', menus:PsdDraft},
|
||||
{label:this.$t('map.platformEmergencyStop'), name:'Esp', menus:EspDraft},
|
||||
{label:this.$t('map.trainWindow'), name:'TrainWindow', menus:TrainWindowDraft},
|
||||
{label:this.$t('map.zcZoneControl'), name:'ZcControl', menus:ZcControlDraft},
|
||||
{label:this.$t('map.functionButton'), name:'ControlDraft', menus:ControlDraft},
|
||||
{label:this.$t('map.saidLamp'), name:'ControlLamp', menus:ControlLamp},
|
||||
{label:this.$t('map.train'), name:'Train', menus:TrainDraft},
|
||||
{label:this.$t('map.line'), name:'Line', menus:LineDraft},
|
||||
{label:'供电线', name:'Power', menus:PowerDraft},
|
||||
{label:this.$t('map.text'), name:'Text', menus:TextDraft},
|
||||
{label:this.$t('map.lcControl'), name:'LcControl', menus:LcControlDraft},
|
||||
{label:this.$t('map.rectangularBox'), name:'OutFrame', menus:OutFrameDraft},
|
||||
{label:this.$t('map.image'), name:'Resource', menus:ImageControlDraft},
|
||||
{label:this.$t('map.boundingBox'), name:'CheckBox', menus:CheckboxDraft},
|
||||
{label:'站间分隔', name:'SplitStation', menus:SplitStation},
|
||||
{label:'箭头', name:'Arrow', menus:Arrow}
|
||||
],
|
||||
feild: '',
|
||||
singlaType: '',
|
||||
stationType: '',
|
||||
@ -306,16 +170,16 @@ export default {
|
||||
watch: {
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
if (this.selected) {
|
||||
this.$refs[this.enabledTab].deleteObj();
|
||||
this.$refs[this.enabledTab][0].deleteObj();
|
||||
}
|
||||
},
|
||||
'$store.state.map.updateCount': function (val) {
|
||||
this.$refs[this.enabledTab].edit();
|
||||
this.$refs[this.enabledTab][0].edit();
|
||||
},
|
||||
selected(val, oldVal) {
|
||||
if (this.selected) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[this.enabledTab].deviceSelect(val);
|
||||
this.$refs[this.enabledTab][0].deviceSelect(val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('standStationCode', this.field);
|
||||
this.$emit('psdCode', this.field);
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||
@ -223,7 +223,7 @@ export default {
|
||||
this.addModel.standCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
this.$emit('psdCode', '');
|
||||
}
|
||||
},
|
||||
create() {
|
||||
|
Loading…
Reference in New Issue
Block a user