增加车站 站台 屏蔽门批量设置功能

This commit is contained in:
zyy 2020-03-06 12:04:00 +08:00
parent 6d0849f5b3
commit b2a154a3a4
4 changed files with 108 additions and 2 deletions

View File

@ -22,7 +22,7 @@ export default class Line2 extends Group {
const style = this.style;
this.safeDoor = new ESafeDoor({
zlevel: this.zlevel,
z: this.z,
z: this.z + 1,
style: style,
x: model.position.x,
y: model.position.y - (model.height / 2),

View File

@ -52,6 +52,25 @@
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three">
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
<el-form-item label="屏蔽门宽度:" prop="width">
<el-input-number v-model="allModel.width" style="width: 140px" />
</el-form-item>
<el-form-item label="屏蔽门高度:" prop="height">
<el-input-number v-model="allModel.height" style="width: 140px" />
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" @click="batchSettings">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -92,6 +111,10 @@ export default {
width: 60,
height: 3,
doorLocationType: '01' //
},
allModel: {
width: '',
height: '',
}
};
},
@ -260,6 +283,17 @@ export default {
_that.$message.info(this.$t('tip.cancelledDelete'));
});
}
},
//
batchSettings() {
let models = [];
this.psdList.forEach(psd => {
const model = deepAssign({}, psd);
model.width = this.allModel.width;
model.height = this.allModel.height;
models.push(model);
})
this.$emit('updateMapModel', models);
}
}
};

View File

@ -66,10 +66,30 @@
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three">
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
<el-form-item label="车站字体:" prop="nameFont">
<el-font v-model="allModel.nameFont" :placeholder="this.$t('tip.stationFont')" />
</el-form-item>
<el-form-item label="公里标字体:" prop="kmPostFont">
<el-font v-model="allModel.kmPostFont" :placeholder="this.$t('tip.stationFont')" />
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" @click="batchSettings">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
</el-tab-pane>
</el-tabs>
</template>
<script>
import ElFont from '@/views/components/font/index';
import { mapGetters } from 'vuex';
import { getUID } from '@/jmapNew/utils/Uid';
import ConfigList from './config/list';
@ -78,7 +98,8 @@ import { deepAssign } from '@/utils/index';
export default {
name: 'StationDraft',
components: {
ConfigList
ConfigList,
ElFont
},
props: {
selected: {
@ -139,6 +160,10 @@ export default {
positionY: [
{ required: true, message: '请输入高度值', trigger: 'blur' }
]
},
allModel: {
nameFont: '',
kmPostFont: ''
}
};
},
@ -464,6 +489,17 @@ export default {
});
}
},
//
batchSettings() {
let models = [];
this.stationList.forEach(station => {
const model = deepAssign({}, station);
model.nameFont = this.allModel.nameFont;
model.kmPostFont = this.allModel.kmPostFont;
models.push(model);
})
this.$emit('updateMapModel', models);
},
handleDelete(index, row) {
this.addModel.modelList.splice(index, 1);
},

View File

@ -25,6 +25,25 @@
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="three">
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt" :model="allModel" label-width="130px" size="mini">
<el-form-item label="站台宽度:" prop="width">
<el-input-number v-model="allModel.width" style="width: 140px" />
</el-form-item>
<el-form-item label="站台高度:" prop="height">
<el-input-number v-model="allModel.height" style="width: 140px" />
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" @click="batchSettings">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -107,6 +126,10 @@ export default {
upDetainLampPoint: {x: 0, y: 0}, //
downDetainLamp: false, //
downDetainLampPoint: {x: 0, y: 0} //
},
allModel: {
width: '',
height: '',
}
};
},
@ -486,6 +509,19 @@ export default {
_that.$message.info(this.$t('tip.cancelledDelete'));
});
}
},
//
batchSettings() {
let models = [];
this.stationStandList.forEach(stationStand => {
if (!stationStand.small) {
const model = deepAssign({}, stationStand);
model.width = this.allModel.width;
model.height = this.allModel.height;
models.push(model);
}
})
this.$emit('updateMapModel', models);
}
}
};