+
{{ $t('display.systemTime.timePause') }}
@@ -8,7 +8,10 @@
class="display-time"
:time="time"
/>
-
+
+
{{ dateString }}
+
{{ dayString }}
+
@@ -35,8 +38,8 @@ export default {
data() {
return {
time: '00:0000',
- top: 0,
- xianRight: 0
+ dateString: '00/00/00',
+ dayString: ''
};
},
computed: {
@@ -44,30 +47,68 @@ export default {
return this.$route.params.mode == 'demon' ||
this.$route.params.mode == 'dp' ||
this.$route.params.mode == 'plan' ||
- this.$route.params.mode == 'script' ||
+ this.$route.params.mode == 'script' ||
+ this.$route.params.mode == 'practice' ||
!this.$route.params.mode;
},
pause() {
return this.$store.state.scriptRecord.simulationPause;
+ },
+ isShowDate() {
+ return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew');
+ },
+ top() {
+ return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew') ? 35 : this.offset;
+ },
+ newRight() {
+ return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew') ? this.$store.state.config.width - 340 - 80 : this.right;
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
const date = new Date(initTime);
- this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
+ this.initDate(date);
}
},
mounted() {
const initTime = this.$store.state.training.initTime;
- this.top = this.offset;
- this.xianRight = this.right;
- if (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) {
- this.top = 35;
- this.xianRight = this.$store.state.config.width - 340;
- }
if (initTime > 0) {
const date = new Date(initTime);
+ this.initDate(date);
+ }
+ },
+ methods: {
+ initDate(date) {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
+ const years = date.getFullYear() + '';
+ let months = date.getMonth() + 1 + '';
+ let dates = date.getDate() + '';
+ if (months.length < 2) { months = '0' + months; }
+ if (dates.length < 2) { dates = '0' + dates; }
+ this.dateString = dates + '/' + months + '/' + years.slice(2);
+ const day = date.getDay();
+ switch (day) {
+ case 0:
+ this.dayString = '星 期 一';
+ break;
+ case 1:
+ this.dayString = '星 期 二';
+ break;
+ case 2:
+ this.dayString = '星 期 三';
+ break;
+ case 3:
+ this.dayString = '星 期 四';
+ break;
+ case 4:
+ this.dayString = '星 期 五';
+ break;
+ case 5:
+ this.dayString = '星 期 六';
+ break;
+ case 6:
+ this.dayString = '星 期 日';
+ }
}
}
};
@@ -96,5 +137,12 @@ export default {
.display-card .el-row {
line-height: 32px !important;
}
+ .display-date-box{
+ height: 29px;
+ line-height: 29px;
+ background: #404040;
+ color: #1DEA1E;
+ text-align: center;
+ }
diff --git a/src/views/newMap/displayNew/menuTrainList.vue b/src/views/newMap/displayNew/menuTrainList.vue
index 30c5769a9..276455a38 100644
--- a/src/views/newMap/displayNew/menuTrainList.vue
+++ b/src/views/newMap/displayNew/menuTrainList.vue
@@ -1,15 +1,10 @@
-