| | |
| | | return false |
| | | } |
| | | |
| | | if (item.setting.supModule) { |
| | | let pid = item.setting.supModule.pop() |
| | | item.setting.supModule = pid || '' |
| | | } else { |
| | | item.setting.supModule = '' |
| | | } |
| | | |
| | | item.subtabs = item.subtabs.filter(tab => { |
| | | if ( |
| | | tab.blacklist && tab.blacklist.length > 0 && |
| | |
| | | } else if (tab.hide === 'true') { |
| | | return false |
| | | } |
| | | |
| | | if (item.setting.supModule) { |
| | | if (tab.controlVal === '@pass@') { |
| | | tab.$pass = true |
| | | } else if (/,/ig.test(tab.controlVal)) { |
| | | tab.controlVals = tab.controlVal.split(',') |
| | | } else { |
| | | tab.controlVals = [(tab.controlVal || '')] |
| | | } |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | |
| | | if (item.setting.supModule) { |
| | | let pid = item.setting.supModule.pop() |
| | | item.setting.supModule = pid || '' |
| | | item.setting.controlField = item.setting.controlField.toLowerCase() |
| | | |
| | | if (item.setting.supModule) { |
| | | item.setting.controlField = item.setting.controlField.toLowerCase() |
| | | |
| | | if (item.setting.supModule === 'preview') { |
| | | item.setting.supModule = '' |
| | | let val = '' |
| | | Object.keys(urlparam).forEach(key => { |
| | | if (key.toLowerCase() === item.setting.controlField) { |
| | | val = urlparam[key] |
| | | } |
| | | }) |
| | | |
| | | item.subtabs = item.subtabs.filter(tab => { |
| | | if (tab.controlVal === val) { |
| | | return false |
| | | } else if (/,/ig.test(tab.controlVal)) { |
| | | return !tab.controlVal.split(',').includes(val) |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | } |
| | | if (item.setting.supModule === 'preview') { |
| | | item.setting.supModule = '' |
| | | let val = '' |
| | | Object.keys(urlparam).forEach(key => { |
| | | if (key.toLowerCase() === item.setting.controlField) { |
| | | val = urlparam[key] |
| | | } |
| | | }) |
| | | |
| | | item.subtabs = item.subtabs.filter(tab => { |
| | | if (tab.$pass) return true |
| | | |
| | | return !tab.controlVals.includes(val) |
| | | }) |
| | | } |
| | | } |
| | | |