调整宁波三菜单&调整加载动画
This commit is contained in:
parent
c432c2f614
commit
9d42aac8fa
13
src/App.vue
13
src/App.vue
@ -25,7 +25,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loadingImg: LoadingImg,
|
||||
loading: false
|
||||
loading: false,
|
||||
loadingStartTime: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -58,10 +59,18 @@ export default {
|
||||
},
|
||||
'$store.state.app.transitionAnimationsCount': function(val) {
|
||||
this.loading = true;
|
||||
this.loadingStartTime = +new Date();
|
||||
},
|
||||
'$route' () {
|
||||
this.$nextTick(function() {
|
||||
this.loading = false;
|
||||
const distance = +new Date() - this.loadingStartTime;
|
||||
if (distance > 100 && distance < 300 ) {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
}, 500);
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -294,7 +294,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '复位',
|
||||
click: this.undeveloped
|
||||
click: this.setTrainReset
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
@ -761,7 +761,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '复位',
|
||||
click: this.undeveloped
|
||||
click: this.setTrainReset
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
@ -1739,7 +1739,7 @@ export default {
|
||||
setTrainDepart() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Train.setTrainDeparture.menu
|
||||
operation: OperationEvent.Train.setTrainDeparture.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
@ -1752,7 +1752,20 @@ export default {
|
||||
breakAway() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Train.breakAwayPlan.menu
|
||||
operation: OperationEvent.Train.breakAwayPlan.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.closeMenu(true);
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
|
||||
this.$refs.trainDepart.doShow(operate);
|
||||
}
|
||||
});
|
||||
},
|
||||
setTrainReset() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Train.setTrainReset.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
|
@ -4,9 +4,9 @@
|
||||
<el-table :data="signalList" height="300px">
|
||||
<el-table-column prop="code" label="列车" />
|
||||
<el-table-column prop="interval" label="班次" />
|
||||
<el-table-column prop="interval" label="模式" />
|
||||
<el-table-column prop="interval" label="状态" />
|
||||
<el-table-column prop="interval" label="运行线" />
|
||||
<el-table-column v-if="isDepart" prop="interval" label="模式" />
|
||||
<el-table-column v-if="isDepart" prop="interval" label="状态" />
|
||||
<el-table-column v-if="isDepart||isBreakAway" prop="interval" label="运行线" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -60,6 +60,15 @@ export default {
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
isDepart() {
|
||||
return this.operate.operation === OperationEvent.Train.setTrainDeparture.menu.operation;
|
||||
},
|
||||
isBreakAway() {
|
||||
return this.operate.operation === OperationEvent.Train.breakAwayPlan.menu.operation;
|
||||
},
|
||||
isReset() {
|
||||
return this.operate.operation === OperationEvent.Train.setTrainReset.menu.operation;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
@ -67,7 +76,15 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车发车';
|
||||
if (this.isDepart) {
|
||||
return '列车发车';
|
||||
} else if (this.isBreakAway) {
|
||||
return '列车脱离班次';
|
||||
} else if (this.isReset) {
|
||||
return '列车复位';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -2297,6 +2297,12 @@ export const OperationEvent = {
|
||||
operation: '70n',
|
||||
domId: '_Tips-Train-breakAwayPlan-Menu'
|
||||
}
|
||||
},
|
||||
setTrainReset: {
|
||||
menu: {
|
||||
operation: '70o',
|
||||
domId: '_Tips-Train-setTrainReset-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user