代码调整
This commit is contained in:
parent
766059611c
commit
88683b3763
@ -46,6 +46,9 @@ export default class Line2 extends Group {
|
|||||||
case '02':
|
case '02':
|
||||||
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||||
break;
|
break;
|
||||||
|
case '03':
|
||||||
|
this.segment && this.segment.setStyle('lineDash', this.style.lineDash || [4]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,8 @@ export default {
|
|||||||
message: '',
|
message: '',
|
||||||
timeCountCommand: -1,
|
timeCountCommand: -1,
|
||||||
timeCountConfirm: -1,
|
timeCountConfirm: -1,
|
||||||
stationName: ''
|
stationName: '',
|
||||||
|
selected: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -232,6 +233,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
|
this.selected = selected;
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||||
this.stationName = selected.name;
|
this.stationName = selected.name;
|
||||||
|
@ -25,13 +25,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import {commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmTip',
|
name: 'ConfirmTip',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
message: '',
|
message: '',
|
||||||
confirmId: ''
|
operation: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -40,6 +43,13 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '确认对话框';
|
return '确认对话框';
|
||||||
|
},
|
||||||
|
confirmId() {
|
||||||
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
|
return OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation;
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -47,12 +57,23 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.message = operate.message || '<div>命令:进路设置</div><div>始端信号机:xxx</div><div>进路:测试进路 </div>';
|
this.message = operate.message || '';
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.confirmId = operate.confirmId;
|
this.operation = operate.operation;
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
this.$emit('close');
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
|
const step = {
|
||||||
|
operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
|
};
|
||||||
|
commitOperate(step, {}, 2).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$emit('close');
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
@ -217,10 +217,13 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 1).then(({valid, operate})=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode);
|
||||||
|
operate.message = `<div>命令:进路设置</div><div>始端信号机:${signal.name}</div><div>进路:${this.row.name} </div>`;
|
||||||
|
this.$refs.confirmTip.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -430,7 +430,7 @@ export default {
|
|||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: 'Switch_Confirm_Axis_Valid',
|
operateType: 'Switch_Confirm_Axis_Valid',
|
||||||
skinCode: '06',
|
skinCode: '06',
|
||||||
trainingName: '确认计轴有效({8}{9})',
|
trainingName: '确认计轴有效({7})',
|
||||||
trainingRemark: '确认计轴有效功能',
|
trainingRemark: '确认计轴有效功能',
|
||||||
trainingType: 'Switch',
|
trainingType: 'Switch',
|
||||||
productTypes: ['02'],
|
productTypes: ['02'],
|
||||||
|
@ -22,7 +22,7 @@ export const OperationEvent = {
|
|||||||
close: {
|
close: {
|
||||||
operation: 'com05',
|
operation: 'com05',
|
||||||
domId: '_Tips-Cmd-Common-Close'
|
domId: '_Tips-Cmd-Common-Close'
|
||||||
},
|
},
|
||||||
|
|
||||||
choose1: {
|
choose1: {
|
||||||
operation: 'com06',
|
operation: 'com06',
|
||||||
@ -43,9 +43,9 @@ export const OperationEvent = {
|
|||||||
close1: {
|
close1: {
|
||||||
operation: 'com10',
|
operation: 'com10',
|
||||||
domId: '_Tips-Cmd-Common-Close1'
|
domId: '_Tips-Cmd-Common-Close1'
|
||||||
},
|
},
|
||||||
|
|
||||||
choose2: {
|
choose2: {
|
||||||
operation: 'com11',
|
operation: 'com11',
|
||||||
domId: '_Tips-Cmd-Common-Choose2'
|
domId: '_Tips-Cmd-Common-Choose2'
|
||||||
},
|
},
|
||||||
@ -1084,6 +1084,10 @@ export const OperationEvent = {
|
|||||||
menuButton:{
|
menuButton:{
|
||||||
operation: '3013',
|
operation: '3013',
|
||||||
domId: '_Tips-Signal-ArrangementRoute-Menu{BOTTOM}'
|
domId: '_Tips-Signal-ArrangementRoute-Menu{BOTTOM}'
|
||||||
|
},
|
||||||
|
secondaryConfirm: {
|
||||||
|
operation: '3014',
|
||||||
|
domId: '_Tips-Signal-ArrangementRoute-SecondaryConfirm'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
|
@ -59,7 +59,9 @@ export default {
|
|||||||
lineColor: '',
|
lineColor: '',
|
||||||
showConditions: '01',
|
showConditions: '01',
|
||||||
points: [],
|
points: [],
|
||||||
stationCode: ''
|
stationCode: '',
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
},
|
},
|
||||||
addModel: {
|
addModel: {
|
||||||
type: '',
|
type: '',
|
||||||
@ -69,7 +71,9 @@ export default {
|
|||||||
points: [
|
points: [
|
||||||
{ x: 0, y: 0 },
|
{ x: 0, y: 0 },
|
||||||
{ x: 100, y: 100 }
|
{ x: 100, y: 100 }
|
||||||
]
|
],
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -91,7 +95,7 @@ export default {
|
|||||||
'lineCode'
|
'lineCode'
|
||||||
]),
|
]),
|
||||||
showConditionsList() {
|
showConditionsList() {
|
||||||
const showConditionsList = ConstConfig.ConstSelect.showConditionsList;
|
const showConditionsList = [...ConstConfig.ConstSelect.showConditionsList, { enlabel:'Draw', label: '仅绘图', value: '04'}];
|
||||||
return Cookies.get('user_lang') == 'en'
|
return Cookies.get('user_lang') == 'en'
|
||||||
? showConditionsList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
? showConditionsList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
||||||
: showConditionsList.map(elem => { return { value: elem.value, label: elem.label }; });
|
: showConditionsList.map(elem => { return { value: elem.value, label: elem.label }; });
|
||||||
@ -113,7 +117,9 @@ export default {
|
|||||||
{ prop: 'width', label: this.$t('map.lineWidth'), type: 'number', min: 1, placeholder: 'px' },
|
{ prop: 'width', label: this.$t('map.lineWidth'), type: 'number', min: 1, placeholder: 'px' },
|
||||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint },
|
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint },
|
||||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }
|
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
|
||||||
|
{ prop: 'offsetX', label: '右侧设备X偏移:', type: 'number', min: 0, isHidden: !this.isFoldLine },
|
||||||
|
{ prop: 'offsetY', label: '左侧设备Y偏移:', type: 'number', min: 0, isHidden: !this.isFoldLine }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
map: {
|
map: {
|
||||||
@ -145,6 +151,9 @@ export default {
|
|||||||
},
|
},
|
||||||
isPointsShow() {
|
isPointsShow() {
|
||||||
return this.editModel.points.length > 0;
|
return this.editModel.points.length > 0;
|
||||||
|
},
|
||||||
|
isFoldLine() {
|
||||||
|
return this.editModel.type == '03';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
Loading…
Reference in New Issue
Block a user