staging 大铁菜单条
This commit is contained in:
parent
5e5c63908d
commit
03115a3d2b
77
src/jmapNew/theme/datie_02/menus/components/menu.vue
Normal file
77
src/jmapNew/theme/datie_02/menus/components/menu.vue
Normal file
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<ul class="settings-menu" :class="{ 'pos-bottom': position === 'bottom', 'pos-right': position === 'right' }">
|
||||
<li
|
||||
class="settings-menu-item"
|
||||
v-for="(item, i) in items"
|
||||
:key="`li-${i}`"
|
||||
@mouseenter="currMenuIndex = i"
|
||||
@mouseleave="currMenuIndex = -1"
|
||||
@click.stop="handleMenuItemClick(item.id)"
|
||||
>
|
||||
<span>{{ item.label }}</span>
|
||||
<span :style="{ float: 'right' }" v-if="item.children">></span>
|
||||
<settings-menu
|
||||
@select="handleMenuItemClick(`${item.id}-${$event}`)"
|
||||
v-if="item.children && currMenuIndex === i"
|
||||
:items="item.children"
|
||||
position="right"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SettingsMenu',
|
||||
props: {
|
||||
items: Array,
|
||||
position: {
|
||||
validator: val => ['right', 'bottom'].includes(val),
|
||||
},
|
||||
},
|
||||
emits: ['select'],
|
||||
computed: {
|
||||
currentSubMenu() {},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currMenuIndex: -1,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleMenuItemClick(id) {
|
||||
if (!id) return
|
||||
this.$emit('select', id)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.settings-menu {
|
||||
background-color: #add8e6;
|
||||
line-height: 2rem;
|
||||
min-width: 160px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 1px solid #666;
|
||||
border-top: 0;
|
||||
}
|
||||
.settings-menu-item {
|
||||
list-style: none;
|
||||
padding: 0 0 0 1rem;
|
||||
border-top: 1px solid #666;
|
||||
position: relative;
|
||||
}
|
||||
.settings-menu-item:hover {
|
||||
background-color: #88d8ee;
|
||||
}
|
||||
.settings-menu-item:active {
|
||||
background-color: #97e3f8;
|
||||
}
|
||||
.pos-right {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
}
|
||||
</style>
|
156
src/jmapNew/theme/datie_02/menus/dialog/boardViewSetting.vue
Normal file
156
src/jmapNew/theme/datie_02/menus/dialog/boardViewSetting.vue
Normal file
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-set-plan"
|
||||
title="占线板显示配置"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="3000"
|
||||
:append-to-body="true"
|
||||
:modal="true"
|
||||
>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="股道视图" name="railView"></el-tab-pane>
|
||||
<el-tab-pane label="进路序列" name="routeSequence"></el-tab-pane>
|
||||
<el-tab-pane label="股道视图显示参数" name="railViewParam"></el-tab-pane>
|
||||
<el-tab-pane label="预览界面" name="preview"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="railView" v-if="activeName === 'railView'">
|
||||
<div class="left">
|
||||
<div class="list">
|
||||
<div class="item">沈阳&沈阳北</div>
|
||||
<div class="item">沈阳</div>
|
||||
</div>
|
||||
<div class="btn-area">
|
||||
<div class="row">
|
||||
<div>显示名</div>
|
||||
<el-input style="width:40%;" v-model="form.railView.displayName"></el-input>
|
||||
<el-select style="width:30%;" v-model="form.railView.view.value">
|
||||
<el-option
|
||||
v-for="option in form.railView.view.options"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-button>增加页面</el-button>
|
||||
<el-button>修改名称</el-button>
|
||||
<el-button>删除页面</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="list">
|
||||
<div class="item">沈阳</div>
|
||||
<div class="item">沈阳北</div>
|
||||
</div>
|
||||
<div class="btn-area">
|
||||
<div class="row">
|
||||
<el-select style="width:100%;" v-model="form.railView.station.value">
|
||||
<el-option
|
||||
v-for="option in form.railView.station.options"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-button>增加视图</el-button>
|
||||
<el-button>删除视图</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="routeSequence" v-if="activeName === 'routeSequence'"></div>
|
||||
<div class="railViewParam" v-if="activeName === 'railViewParam'"></div>
|
||||
<div class="preview" v-if="activeName === 'preview'"></div>
|
||||
<div class="optBar">
|
||||
<el-button-group>
|
||||
<el-button width="100px">生成默认股道视图设置</el-button>
|
||||
<el-button>生成默认序列视图设置</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group>
|
||||
<el-button>保存</el-button>
|
||||
<el-button @click="doClose">关闭</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BoardViewSetting',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
activeName: 'railView',
|
||||
form: {
|
||||
railView: {
|
||||
diaplayName: '',
|
||||
view: {
|
||||
value: 'rail',
|
||||
options: [
|
||||
{
|
||||
label: '股道视图',
|
||||
value: 'rail',
|
||||
},
|
||||
],
|
||||
},
|
||||
station: {
|
||||
value: 'shenyang',
|
||||
options: [{ label: '沈阳', value: 'shenyang' }],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true
|
||||
},
|
||||
doClose() {
|
||||
this.show = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// /deep/.el-dialog__body {
|
||||
// background: #8d939d !important;
|
||||
// }
|
||||
.railView {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
.left,
|
||||
.right {
|
||||
width: 50%;
|
||||
}
|
||||
.list {
|
||||
margin: 10px;
|
||||
background-color: #fff;
|
||||
height: 10rem;
|
||||
padding: 0 5px;
|
||||
.item {
|
||||
line-height: 1.2rem;
|
||||
}
|
||||
}
|
||||
.row {
|
||||
margin: 8px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
.optBar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.el-button {
|
||||
width: auto !important;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user