UPDATE: 1、重新修改激活逻辑;2、优化
This commit is contained in:
@@ -41,32 +41,23 @@ const modeList = [
|
||||
name: '模拟式模块',
|
||||
code: '模拟式',
|
||||
key: 'simulate',
|
||||
activated:
|
||||
isActivateOpen === 'true'
|
||||
? activateInfo.simulate.apply === 1 && activateInfo.simulate.permanently === 1
|
||||
: true
|
||||
activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true
|
||||
},
|
||||
{
|
||||
name: '数字式模块',
|
||||
code: '数字式',
|
||||
key: 'digital',
|
||||
activated:
|
||||
isActivateOpen === 'true'
|
||||
? activateInfo.digital.apply === 1 && activateInfo.digital.permanently === 1
|
||||
: true
|
||||
activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true
|
||||
},
|
||||
{
|
||||
name: '比对式模块',
|
||||
code: '比对式',
|
||||
key: 'contrast',
|
||||
activated:
|
||||
isActivateOpen === 'true'
|
||||
? activateInfo.contrast.apply === 1 && activateInfo.contrast.permanently === 1
|
||||
: true
|
||||
activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true
|
||||
}
|
||||
]
|
||||
const handelOpen = async (item: string, key: string) => {
|
||||
if (isActivateOpen === 'true' && (activateInfo[key].apply !== 1 || activateInfo[key].permanently !== 1)) {
|
||||
if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) {
|
||||
ElMessage.warning(`${item}模块未激活`)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user