Merge branch 'master' of https://git.qcloud.com/joylink/jl-nclient
This commit is contained in:
commit
842c7f9df2
@ -1,6 +1,15 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou-01__systerm view-train-id" title="列车识别号显示设置" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="fuzhou-01__systerm view-train-id"
|
||||
title="列车识别号显示设置"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px double lightgray;">
|
||||
<span class="base-label">计划车显示模式</span>
|
||||
<el-radio-group v-model="planMode">
|
||||
@ -47,7 +56,7 @@
|
||||
<span class="base-label">字体大小</span>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99"></el-input>
|
||||
<el-input v-model="fontSize" size="small" min="16" max="99" />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="1">
|
||||
<span style="height:32px; line-height:32px;">(范围:16-99)</span>
|
||||
@ -62,17 +71,20 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import deviceType from '@/jmap/constant/deviceType';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
// import deviceType from '@/jmap/constant/deviceType';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewTrainId',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -81,11 +93,8 @@
|
||||
operation: '',
|
||||
planMode: 5,
|
||||
headMode: 5,
|
||||
fontSize: 16,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
fontSize: 16
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
@ -102,7 +111,7 @@
|
||||
this.$nextTick(() => {
|
||||
this.setTrainDispaly();
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -125,42 +134,42 @@
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
val: [this.planMode, this.headMode, this.fontSize].join('::')
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.setTrainDispaly();
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
});
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatlist = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
const updatlist = [];
|
||||
const trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
const nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
const nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
|
||||
});
|
||||
@ -181,5 +190,5 @@
|
||||
return ''; // 无格式类型
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user