/**
* 数组值是否一致
* @param arr 数组值
* @returns 是否一致
*/
private isTrueSome(arr: any): boolean {
if (arr && arr.length > 0) {
return !arr.some((v, i) => { return v !== arr[0] });
}
return true
}
/**
* 验证多个子选项是否开启
* @param systemOption 系统选项值
* @param openIndex 系统选项-子选项索引 索引必须大于0
* @returns 是否开启
*/
private getSystemOptionMultiple(systemOption: SystemOption, openIndexs: Array<number>): boolean {
if (systemOption.OptionSwitch == 1 && openIndexs && openIndexs.length > 0) {
const _all = systemOption.optionValue.split(',') || [];
if (openIndexs.length > _all.length) return false;
return openIndexs.some(_v => parseInt(_all[(_v - 1)]) == 1);
}
return false;
}