设置限速灰显判断调整

This commit is contained in:
fan 2023-05-30 16:00:04 +08:00
parent 62e2c3978f
commit 88d09f2645
3 changed files with 6 additions and 6 deletions

View File

@ -79,14 +79,14 @@ export default {
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1,
isDisabled: (section, work) => section.speedUpLimit > 0,
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1,
isDisabled: (section, work) => section.speedUpLimit <= 0,
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
}
],

View File

@ -105,14 +105,14 @@ export default {
label: '设置限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1,
isDisabled: (section, work) => section.speedUpLimit > 0,
isShow: (section, work) => section.type === '02'
},
{
label: '取消限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1,
isDisabled: (section, work) => section.speedUpLimit <= 0,
isShow: (section, work) => section.type === '02'
}
],

View File

@ -105,14 +105,14 @@ export default {
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1,
isDisabled: (section, work) => section.speedUpLimit > 0,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1,
isDisabled: (section, work) => section.speedUpLimit <= 0,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
}
],