|
|
@ -76,14 +76,15 @@ function rule2json() { |
|
|
|
let RuleJSON = Container(); |
|
|
|
let RuleJSON = Container(); |
|
|
|
// 转换base
|
|
|
|
// 转换base
|
|
|
|
Object.keys(RuleJSON).forEach(key => { |
|
|
|
Object.keys(RuleJSON).forEach(key => { |
|
|
|
if (!key.startsWith("rule")) { |
|
|
|
RuleJSON[key] = $('#' + key).value; |
|
|
|
RuleJSON[key] = $('#' + key).value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
RuleJSON.lastUpdateTime = new Date().getTime(); |
|
|
|
RuleJSON.lastUpdateTime = new Date().getTime(); |
|
|
|
RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder); |
|
|
|
RuleJSON.customOrder = RuleJSON.customOrder == '' ? 0 : parseInt(RuleJSON.customOrder); |
|
|
|
RuleJSON.enabled = RuleJSON.enabled == '' || String(RuleJSON.enabled).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true'; |
|
|
|
RuleJSON.enabled = RuleJSON.enabled == '' || String(RuleJSON.enabled).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true'; |
|
|
|
|
|
|
|
RuleJSON.enableJs = RuleJSON.enableJs == '' || String(RuleJSON.enableJs).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true'; |
|
|
|
|
|
|
|
RuleJSON.loadWithBaseUrl = RuleJSON.loadWithBaseUrl == '' || String(RuleJSON.loadWithBaseUrl).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true'; |
|
|
|
|
|
|
|
RuleJSON.singleUrl = RuleJSON.singleUrl == '' || String(RuleJSON.singleUrl).toLocaleLowerCase().replace(/^\s*|\s*$/g, '') == 'true'; |
|
|
|
return RuleJSON; |
|
|
|
return RuleJSON; |
|
|
|
} |
|
|
|
} |
|
|
|
// 将源对象填充到源表单
|
|
|
|
// 将源对象填充到源表单
|
|
|
|