This commit is contained in:
zyy 2020-12-22 10:27:30 +08:00
commit 3a5eaaa544
12 changed files with 113 additions and 56 deletions

View File

@ -172,16 +172,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -108,16 +108,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -110,16 +110,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -175,21 +175,12 @@ export default {
hover(field) { hover(field) {
this.field = field == this.field ? '' : field; this.field = field == this.field ? '' : field;
}, },
doShow(operate, selected, judge, flag) { doShow(operate, selected, judge) {
if (!this.dialogShow) { if (!this.dialogShow) {
this.switchName = ''; this.switchName = '';
this.stationName = ''; this.stationName = '';
this.operation = operate.operation; this.operation = operate.operation;
this.cmdType = operate.cmdType; this.cmdType = operate.cmdType;
if (selected._type == 'Station') {
if (flag) {
// hou
} else if (selected.zcCode) {
selected = this.$store.getters['map/getDeviceByCode'](selected.zcCode);
} else {
selected._type = '';
}
}
let name = selected.name; let name = selected.name;
if (selected._type == 'Train') { if (selected._type == 'Train') {
name = selected.serviceNumber; name = selected.serviceNumber;

View File

@ -146,16 +146,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -164,16 +164,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -121,30 +121,36 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
setStationStoppage() { setStationStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected, false, true); this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
} }
}); });
}, },
cancelStationStoppage() { cancelStationStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected, false, true); this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -151,16 +151,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -146,16 +146,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -151,16 +151,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -165,16 +165,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },

View File

@ -231,16 +231,22 @@ export default {
// //
setStoppage() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
if (valid) { if (valid && this.selected.zcCode) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
} else if (!this.selected.zcCode) {
console.error('该车站无zc设备');
} }
}); });
}, },