|
@@ -100,7 +100,7 @@ class codeRuleSet {
|
|
|
html.push('</span>');
|
|
|
const part = $('#ruleParts', obj).append(html.join(''));
|
|
|
// 更新规则预览
|
|
|
- const connectorType = connectorRule !== '' && parseInt(connectorRule) !== 3 ? ruleConst.connectorString[connectorRule] : '';
|
|
|
+ const connectorType = connectorRule !== '' && parseInt(connectorRule) !== ruleConst.connectorType.nothing ? ruleConst.connectorString[connectorRule] : '';
|
|
|
const previewtext = $.trim($('#preview', obj).text()) === '' ? preview : $.trim($('#preview', obj).text()) + connectorType + preview;
|
|
|
$('#preview', obj).text(previewtext);
|
|
|
});
|
|
@@ -108,13 +108,12 @@ class codeRuleSet {
|
|
|
$($('#ruleParts', obj)).on('click', 'a', function () {
|
|
|
const index = $('a', obj).index(this);
|
|
|
codeRule.splice(index-1, 1);
|
|
|
- console.log(index);
|
|
|
$(this).parent().remove();
|
|
|
const rules = $('span>span', obj), ruleText = [];
|
|
|
for (const r of rules) {
|
|
|
ruleText.push($.trim(r.innerText));
|
|
|
}
|
|
|
- const connectorType = connectorRule !== '' && parseInt(connectorRule) !== 3 ? ruleConst.connectorString[connectorRule] : '';
|
|
|
+ const connectorType = connectorRule !== '' && parseInt(connectorRule) !== ruleConst.connectorType.nothing ? ruleConst.connectorString[connectorRule] : '';
|
|
|
$('#preview', obj).text(ruleText.join(connectorType));
|
|
|
});
|
|
|
}
|
|
@@ -143,6 +142,7 @@ $(document).ready(() => {
|
|
|
|
|
|
// $('#first').modal('show');
|
|
|
$('#setting').modal('show');
|
|
|
+ connectorRule = ruleConst.connectorType.nothing;
|
|
|
} else if ($('#changList').children.length === 0) {
|
|
|
$('#add-bj').modal('show');
|
|
|
}
|
|
@@ -158,9 +158,11 @@ $(document).ready(() => {
|
|
|
$('#autoCodeShow').show();
|
|
|
}
|
|
|
postData('/tender/rule', data, function () {
|
|
|
- $('#setting').modal('hide');
|
|
|
if (parseInt(cRuleFirst) && showNoNeed) {
|
|
|
+ $('#changeFirst').click();
|
|
|
$('#add-bj').modal('show');
|
|
|
+ } else {
|
|
|
+ $('#setting').modal('hide');
|
|
|
}
|
|
|
});
|
|
|
})
|