rt-sim-training-client/src/views/planMonitor/newEditTool/menuBar.vue

913 lines
32 KiB
Vue
Raw Normal View History

2020-08-14 18:30:04 +08:00
<template>
<div id="PlanMenuBar">
<div class="nav" style="height:45px;">
<template v-for="(item,i) in menus">
<template v-if="noShowingChildren(item.children)">
<li v-if="isNotUser" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li v-if="isNotUser" :key="i" class="nav-li" :class="{'menu_active' :i==classA}" @click.stop="popupMenuA(item, i)">
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template
v-if="child.children&&child.children.length>0&&hasShowingChildren(child.children)"
>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" :key="j" class="menu-li">
<div class="menu-li-block" :disabled="child.disabled">
<span class="menu-li-text">
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
<span> {{ child.title }}</span>
</el-button>
</span>
</div>
</li>
<li v-else :key="j" class="menu-li" @click.stop="popupMenuB(child, j)">
<div class="menu-li-block" :disabled="child.disabled">
<span class="menu-li-text">
<span class="label">{{ child.title }}</span>
2021-03-12 17:18:02 +08:00
<i v-if="j!==classB" class="el-icon-arrow-right" style="float: right;height: 30px;line-height: 30px;" />
<i v-if="j===classB" class="el-icon-arrow-left" style="float: right;height: 30px;line-height: 30px;" />
2020-08-14 18:30:04 +08:00
</span>
</div>
2021-03-12 17:18:02 +08:00
<ul class="menu-ul" :class="{'children-active' :j==classB}">
2020-08-14 18:30:04 +08:00
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="separator">&ensp;</span>
</li>
<li v-else-if="grandchild.type === 'file'" :key="k" class="menu-li">
<div class="menu-li-block" :disabled="grandchild.disabled">
<span class="menu-li-text">
<el-button
type="text"
class="button"
:disabled="grandchild.disabled"
>
<input
:ref="grandchild.label"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(grandchild)"
>
<span> {{ grandchild.title }}</span>
</el-button>
</span>
</div>
</li>
<li v-else :key="k" class="menu-li" @click.stop="hookClick(grandchild)">
<div class="menu-li-block" :disabled="grandchild.disabled">
<span class="menu-li-text">
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="separator">&ensp;</span>
</li>
<li v-else-if="child.type === 'file'" :key="j" class="menu-li">
<div class="menu-li-block" :disabled="child.disabled">
<span class="menu-li-text">
<el-button type="text" class="button" :disabled="child.disabled">
<input
:ref="child.title"
type="file"
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
@change="openLoadFile(child)"
>
<span> {{ child.title }}</span>
</el-button>
</span>
</div>
</li>
<li v-else :key="j" class="menu-li" @click.stop="hookClick(child)">
<div class="menu-li-block" :disabled="child.disabled">
<span class="menu-li-text">
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
<div class="nav-li" style="position: absolute; right: 10px;" @click="back">
2021-05-10 13:50:17 +08:00
<span class="nav-li-text">{{ dispaly||closeWindow?'关闭':$t('global.back') }}</span>
2020-08-14 18:30:04 +08:00
</div>
</div>
2021-03-12 17:18:02 +08:00
<el-dialog
title="运行图发布"
:visible.sync="publishVisible"
width="30%"
center
:modal="false"
:before-close="handleClose"
>
<el-input v-model="publishName"><template slot="prepend">运行图名称:</template></el-input>
<span slot="footer" class="dialog-footer">
<el-button @click="publishVisible = false"> </el-button>
<el-button type="primary" @click="confirmPublish"> </el-button>
</span>
</el-dialog>
<route-map ref="routeMap" :load-run-plan-id="loadRunPlanId" />
2021-03-09 14:30:45 +08:00
<runplan-config ref="runplanConfig" />
2020-08-14 18:30:04 +08:00
</div>
</template>
<script>
import { mapGetters } from 'vuex';
2021-03-09 14:30:45 +08:00
import routeMap from '../components/routingoperate/routeMap';
import RunplanConfig from '../components/routingoperate/runplanConfig';
2021-03-12 17:18:02 +08:00
import { planEffectiveCheck, clearPlaningData } from '@/api/runplan';
// import { launchFullscreen } from '@/utils/screen';
// import { UrlConfig } from '@/scripts/ConstDic';
2020-08-14 18:30:04 +08:00
import { EventBus } from '@/scripts/event-bus';
2021-03-12 17:18:02 +08:00
import { publishRunPlanAllUser } from '@/api/designPlatform';
import { deleteRunPlan } from '@/api/runplan';
2020-08-14 18:30:04 +08:00
export default {
name: 'PlanMenuBar',
2021-03-09 14:30:45 +08:00
components: { routeMap, RunplanConfig },
2020-08-14 18:30:04 +08:00
props: {
planConvert: {
type: Object,
default: function() {
return { };
}
},
2021-03-12 17:18:02 +08:00
runPlanList: {
type: Array,
default: function() {
return [];
}
},
2020-08-14 18:30:04 +08:00
loadRunPlanId: {
type: String,
default: function() {
return '';
}
2021-03-12 17:18:02 +08:00
},
loadRunPlanName: {
type: String,
default: function() {
return '';
}
2020-08-14 18:30:04 +08:00
}
},
data() {
return {
isNotUser: true,
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
menus: [],
loading: null,
2021-03-12 17:18:02 +08:00
publishName: '',
publishVisible: false,
2020-08-14 18:30:04 +08:00
menuBase: [
{
title: this.$t('planMonitor.file'),
children: [
2021-03-12 17:18:02 +08:00
{
title: '创建',
click: this.newRunPlan
},
{
title: '打开',
children: []
},
{
title: '删除',
click: this.deleteRunPlanOperate
},
2021-01-29 14:40:09 +08:00
{
title: '重命名',
click: this.modifyRunPlanName
2021-03-12 17:18:02 +08:00
},
{
title: '发布',
click: this.publishRunPlan
2020-08-14 18:30:04 +08:00
}
2021-03-05 16:44:32 +08:00
// {
// title: '创建运行图',
// click: this.newRunPlan
// }
2020-08-14 18:30:04 +08:00
]
},
{
title: this.$t('planMonitor.tool'),
children: [
{
2021-03-16 09:55:28 +08:00
title: '生成计划',
2021-01-29 14:40:09 +08:00
click: this.handleGernaratePlanningTrain
}
2020-08-14 18:30:04 +08:00
]
},
{
2021-01-29 14:40:09 +08:00
title: '编辑',
2020-08-14 18:30:04 +08:00
children: [
{
title: this.$t('planMonitor.addPlan'),
click: this.handleAddPlanningTrain
},
{
title: this.$t('planMonitor.deletePlan'),
click: this.handleDeletePlanningTrain
},
2020-12-22 17:27:04 +08:00
{
2021-01-29 14:40:09 +08:00
title: '平移计划',
2020-12-22 17:27:04 +08:00
click: this.handleMovePlanningTrain
},
2020-08-14 18:30:04 +08:00
{
title: this.$t('planMonitor.duplicatePlan'),
click: this.handleDuplicateTrain
},
{
type: 'separator'
},
{
title: this.$t('planMonitor.addTask'),
click: this.handleAddTask
},
{
title: this.$t('planMonitor.deleteTask'),
click: this.handleDeleteTask
},
{
title: this.$t('planMonitor.modifyTask'),
click: this.handleModifyingTask
},
2020-12-22 17:27:04 +08:00
{
title: '清除数据',
click: this.handleClearData
2020-08-14 18:30:04 +08:00
}
]
2020-12-11 20:17:18 +08:00
},
{
title: '配置',
children: [
{
title: '交路设置',
click: this.handleRoutingSettings
},
{
2021-01-29 14:40:09 +08:00
title: '运行等级设置',
click: this.handleRoutingLevel
2020-12-11 20:17:18 +08:00
},
{
2021-01-29 14:40:09 +08:00
title: '停站时间设置',
2020-12-11 20:17:18 +08:00
click: this.handleDwellTime
},
{
2021-03-09 10:31:56 +08:00
title: '折返时间设置',
2021-01-29 14:40:09 +08:00
click: this.handleRunplanParams
}
]
},
{
title: '测试',
children: [
{
title: this.$t('planMonitor.validityCheck'),
click: this.handlePlanEffectiveCheck
2020-12-11 20:17:18 +08:00
}
2021-03-12 17:18:02 +08:00
// {
// title: this.$t('planMonitor.testRunningDiagram'),
// click: this.handleTestRunPlan
// }
2020-12-11 20:17:18 +08:00
]
2020-08-14 18:30:04 +08:00
}
2021-03-05 16:44:32 +08:00
// {
// title: this.$t('planMonitor.modify'),
// children: [
// // {
// // title: '计划参数',
// // click: this.handleParameter,
// // },
// // {
// // title: '打印参数',
// // click: this.undeveloped,
// // },
// // {
// // type: 'separator'
// // },
// // {
// // type: 'separator'
// // },
// // {
// // title: '修改交路',
// // click: this.handleModifyingRouting,
// // },
// // {
// // title: '修改开始时间',
// // click: this.handleModifyingStartTime,
// // },
// // {
// // title: '快速增加任务',
// // click: this.undeveloped,
// // }
// ]
// }
2020-08-14 18:30:04 +08:00
]
};
},
computed: {
...mapGetters('training', [
'mode'
]),
...mapGetters('map', [
'stationList'
]),
dispaly() {
return this.$route.path.includes('display');
2021-05-10 13:50:17 +08:00
},
closeWindow() {
return this.$route.path.includes('newTool');
2020-08-14 18:30:04 +08:00
}
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
2021-03-05 16:44:32 +08:00
'$route.query.planId': function () {
this.menus = this.menuConvert(this.menuBase);
2021-05-10 13:50:17 +08:00
},
runPlanList() {
this.initMenu();
2020-08-14 18:30:04 +08:00
}
},
created() {
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
this.isNotUser = false;
} else {
this.isNotUser = true;
}
},
mounted() {
this.initMenu();
},
methods: {
back() {
// this.$router.push({ path: `${UrlConfig.plan.detail}/${this.$route.query.mapId}` });
2021-03-05 16:44:32 +08:00
if (this.dispaly) {
this.$emit('doClose');
2021-05-10 13:50:17 +08:00
} else if (this.closeWindow) {
window.close();
2021-03-05 16:44:32 +08:00
} else {
this.$router.go(-1);
}
2020-08-14 18:30:04 +08:00
},
menuConvert(menuBase) {
const menus = [];
menuBase.forEach(elem => {
const item = {};
Object.keys(elem).forEach(key => {
if (key == 'disabledCallback') {
item['disabled'] = elem.disabledCallback();
} else if (key != 'children') {
item[key] = elem[key];
} else {
item.children = this.menuConvert(elem.children || []);
}
});
menus.push(item);
});
return menus;
},
initMenu() {
2021-03-12 17:18:02 +08:00
const menuLoading = [];
this.runPlanList.forEach(item => {
menuLoading.push({title: item.name, planId:item.id, planName: item.name, click: this.loadingRunPlan});
});
this.menuBase.forEach(item => {
if (item.title === this.$t('planMonitor.file')) {
item.children.forEach(elem => {
if (elem.title === '打开') {
elem.children = menuLoading;
}
});
}
});
2020-08-17 18:12:51 +08:00
this.menus = this.menuConvert(this.menuBase);
2020-08-14 18:30:04 +08:00
this.clickEvent();
this.closeMenu();
},
clickEvent() {
const self = this;
window.onclick = function (e) {
self.closeMenu(false);
};
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu() {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
},
hookClick(item, event) {
this.closeMenu();
if (!item.disabled) {
setTimeout(() => {
if (item && typeof item.click == 'function') {
item.click(item);
}
}, 500);
}
},
popupMenuA(item, index) {
this.clickEvent();
this.tempClassA = index;
this.tempClassB = -1;
},
popupMenuB(item, index) {
this.tempClassB = index;
},
openLoadFile(item) {
const obj = this.$refs[item.title][0];
if (obj.files) {
const file = obj.files[0];
item.click(file);
obj.value = '';
}
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
},
// 刷新
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert( this.$t('planMonitor.implemented'), this.$t('tip.hint'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
loadingScreen() {
this.loading = this.$loading({
lock: true,
text: this.$t('tip.underImport'),
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
},
2021-03-12 17:18:02 +08:00
newRunPlan() {
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
2020-08-14 18:30:04 +08:00
},
// 自动生成
handleAutoGenerate() {
this.$emit('dispatchDialog', { name: 'editSmoothRunTime', params: {} });
},
2020-12-11 20:17:18 +08:00
// 交路设置
handleRoutingSettings() {
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
this.$refs.routeMap.doShow('routeMap');
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
2020-12-11 20:17:18 +08:00
},
// 运行图配置文件
handleRunplanParams() {
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
this.$refs.runplanConfig.doShow();
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
2020-12-11 20:17:18 +08:00
},
2021-03-05 16:44:32 +08:00
// 停站时间
handleDwellTime() {
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
this.$emit('dispatchDialog', { name: 'modifyingStationStopTime', params: {} });
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
2021-03-05 16:44:32 +08:00
},
// 运行等级
handleRoutingLevel() {
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
2021-03-05 16:44:32 +08:00
},
2020-12-11 20:17:18 +08:00
// 生成计划
handleGernaratePlanningTrain() {
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
// this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
this.$refs.routeMap.doShow('generateRouting');
2021-03-12 17:18:02 +08:00
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
2020-12-11 20:17:18 +08:00
},
2020-08-14 18:30:04 +08:00
// 校验运行图
handlePlanEffectiveCheck() {
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
planEffectiveCheck(this.loadRunPlanId).then(resp => {
2020-08-14 18:30:04 +08:00
this.$emit('dispatchDialog', {
name: 'systermOut',
params: {
width: 600,
contextList: resp.data.length > 0 ? resp.data : ['检查成功']
}
});
}).catch(() => {
this.$messageBox(this.$t('tip.runGraphVerificationFailed'));
});
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
},
// 计划参数
handleParameter() {
this.$emit('dispatchDialog', { name: 'parameter', params: {} });
},
// 添加计划
handleAddPlanningTrain() {
const planId = this.loadRunPlanId;
2021-03-05 16:44:32 +08:00
if (planId) {
2020-08-14 18:30:04 +08:00
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
} else {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
},
2021-03-05 16:44:32 +08:00
// 清除数据
handleClearData() {
this.$confirm('本操作将清除本运行图数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
}).then(() => {
2021-03-12 17:18:02 +08:00
clearPlaningData(this.loadRunPlanId).then(resp => {
2021-03-05 16:44:32 +08:00
console.log('清除数据成功!');
2021-05-10 13:50:17 +08:00
this.$emit('refreshData', this.loadRunPlanId);
2021-03-05 16:44:32 +08:00
}).catch(() => {
this.$message.error('清除数据失败!');
});
}).catch(() => {
console.error('清除数据失败!');
});
},
2020-08-14 18:30:04 +08:00
// 删除计划
handleDeletePlanningTrain() {
2021-03-12 17:18:02 +08:00
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
2020-08-14 18:30:04 +08:00
if (serviceNumber) {
2021-12-09 17:56:54 +08:00
this.$emit('dispatchDialog', {
2020-08-14 18:30:04 +08:00
name: 'offLine', params: {
type: 'warning',
width: 260,
message: this.$t('tip.deleteTrainHint') + serviceNumber + '?',
operate: 'DeletePlanningTrain',
serviceNumber: serviceNumber,
refresh: true
}
});
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
// 修改计划
handleEditPlanningTrain() {
2021-03-12 17:18:02 +08:00
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
2020-08-14 18:30:04 +08:00
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'editPlanningTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
2020-12-22 17:27:04 +08:00
// 移动计划
handleMovePlanningTrain() {
2021-03-12 17:18:02 +08:00
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
2020-12-22 17:27:04 +08:00
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
2020-08-14 18:30:04 +08:00
// 复制计划
handleDuplicateTrain() {
2021-03-12 17:18:02 +08:00
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
2020-08-14 18:30:04 +08:00
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'duplicateTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
// 添加任务
handleAddTask() {
2021-03-12 17:18:02 +08:00
const params = this.$store.state.runPlan.draftSelected;
2020-08-14 18:30:04 +08:00
if (params.serviceNumber && params.tripNumber) {
2021-12-09 17:56:54 +08:00
// this.$emit('dispatchDialog', { name: 'addTask', params });
params.dialogType = 'addTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
2020-08-14 18:30:04 +08:00
} else {
this.$messageBox(this.$t('tip.selectATrain'));
}
},
// 删除任务
handleDeleteTask() {
2021-03-12 17:18:02 +08:00
const params = this.$store.state.runPlan.draftSelected;
2020-08-14 18:30:04 +08:00
if (params.serviceNumber && params.tripNumber) {
2021-12-09 17:56:54 +08:00
// this.$emit('dispatchDialog', { name: 'deleteTask', params });
params.dialogType = 'deleteTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
2020-08-14 18:30:04 +08:00
} else {
this.$messageBox(this.$t('tip.selectATrain'));
}
},
// 修改任务
handleModifyingTask() {
2021-03-12 17:18:02 +08:00
const params = this.$store.state.runPlan.draftSelected;
2020-08-14 18:30:04 +08:00
if (params.serviceNumber && params.tripNumber) {
// this.$emit('dispatchDialog', { name: 'modifyingTask', params });
params.dialogType = 'modifyingTask';
this.$emit('dispatchDialog', { name: 'showDialog', params });
2020-08-14 18:30:04 +08:00
} else {
this.$messageBox(this.$t('tip.selectATrain'));
}
},
modifyRunPlanName() {
this.$emit('modifyRunPlanName');
},
// 修改交路
handleModifyingRouting() {
2021-03-12 17:18:02 +08:00
const params = this.$store.state.runPlan.draftSelected;
2020-08-14 18:30:04 +08:00
this.$emit('dispatchDialog', { name: 'modifyingRouting', params });
},
// 修改开始时间
handleModifyingStartTime() {
2021-03-12 17:18:02 +08:00
const params = this.$store.state.runPlan.draftSelected;
2020-08-14 18:30:04 +08:00
this.$emit('dispatchDialog', { name: 'modifyingBeginTime', params });
},
loadingRunPlan(param) {
this.$emit('loadingRunPlan', param);
},
2021-03-12 17:18:02 +08:00
deleteRunPlanOperate() {
2020-08-14 18:30:04 +08:00
// 删除运行图
2021-03-12 17:18:02 +08:00
if (this.loadRunPlanId) {
this.$confirm(this.$t('planMonitor.openRunPlan.confirmDeleteRunPlan'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
deleteRunPlan(this.loadRunPlanId).then(Response => {
this.$message.success(this.$t('planMonitor.openRunPlan.deleteSuccess'));
this.$emit('refresh');
}).catch(() => {
this.$messageBox(this.$t('tip.deleteOperationGraphFailed'));
});
}).catch(() => { });
} else {
this.$message.error('请先打开运行图!');
}
2021-03-05 16:44:32 +08:00
},
2021-03-12 17:18:02 +08:00
publishRunPlan() {
if (this.loadRunPlanId) {
this.publishVisible = true;
this.publishName = this.loadRunPlanName;
} else {
this.$message.error('请先打开运行图!');
}
},
2021-05-10 13:50:17 +08:00
handleClose() {
this.publishVisible = false;
},
2021-03-12 17:18:02 +08:00
confirmPublish() {
publishRunPlanAllUser(this.loadRunPlanId, this.publishName || this.loadRunPlanName).then(resp => {
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
this.publishVisible = false;
}).catch(() => {
this.$messageBox(this.$t('tip.publishRunPlanFail'));
this.publishVisible = false;
2020-08-14 18:30:04 +08:00
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 0px;
$width: 30px;
$height: 40px;
$menuPadding: 15px;
$menuItemHeight: 30px;
$menuItemWidth: 160px;
$menuItemPadding: 5px;
#PlanMenuBar {
width: 100%;
line-height: $height;
position: absolute;
z-index: 2;
2021-05-10 13:50:17 +08:00
left:0;
top:0;
2020-08-14 18:30:04 +08:00
}
.nav {
display: block;
cursor: pointer;
list-style: none;
// border: 1px solid #B6BCCC !important;
background-color: #293c55;
box-sizing: border-box;
padding-left: 20px;
}
.nav-li {
position: relative;
display: inline-block;
padding: 0 $menuPadding;
color: rgba(255,255,255,0.45);
border-top: 4px solid #293c55;
}
.nav-li.menu_active {
border-top: 4px solid #a9334c;
background-color: #0e151f;
transition: 0.5s all;
}
.nav-li:hover {
border-top: 4px solid #a9334c;
background-color: #0e151f;
transition: 0.5s all;
}
.nav-li:hover .nav-li-text{
color: #fff;
}
.nav-li.menu_active .nav-li-text {
color: #fff;
}
.nav-li-text {
font-size: 13px;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
left: 0;
display: block !important;
}
2021-03-05 16:44:32 +08:00
2021-05-10 13:50:17 +08:00
.children-active {
position: relative;
left: 160px;
display: block !important;
padding-left: 0px;
}
2020-08-14 18:30:04 +08:00
.menu-ul-text {
font-size: 14px;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
border-left: 1px solid #000;
border-right: 1px solid #000;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #293c55;
// margin-left: 5px;
height: 2px;
width: 100%;
}
.menu-li {
text-align: left;
background: #162436;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
}
.menu-li-text .label {
display: inline-block;
margin-left: 5px;
padding-left: 12px;
}
.menu-li-text .button {
position: relative;
overflow: hidden;
line-height: 0px;
width: 100%;
top: 0;
color:rgba(255,255,255,0.45);
cursor: pointer;
padding-left: 16px;
text-align: left;
input {
opacity: 0;
cursor: pointer;
position: absolute;
top: 0px;
width: $menuItemWidth - $width - 10px;
}
}
.menu-li-block:hover {
background: #C9DEF7;
color: #000;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.menu-li-text .button:hover{
color: #000;
}
</style>