From 3d00a1bef761c34adee410454eb0ede54f882751 Mon Sep 17 00:00:00 2001
From: Administrator <1051256694@qq.com>
Date: 星期四, 19 三月 2026 12:56:05 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js | 36 +++++++++++++++++++++++++++++++-----
1 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js b/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
index eb9db67..dbd3182 100644
--- a/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
+++ b/src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
@@ -12,7 +12,11 @@
s1MaxTurnDiff: 1,
s2BusyWeight: 2.0,
s2RunBlockWeight: 10.0,
- s2LoopLoadWeight: 12.0
+ s2LoopLoadWeight: 12.0,
+ stationPathLenWeightPercent: 50,
+ stationPathCongWeightPercent: 50,
+ stationPathPassOtherOutStationWeightPercent: 100,
+ stationPathPassOtherOutStationForceSkip: false
}
}
@@ -72,7 +76,7 @@
return {
loading: false,
saving: false,
- scoreMode: 'legacy',
+ scoreMode: 'twoStage',
defaultProfileCode: 'default',
profiles: [],
rules: [],
@@ -315,7 +319,7 @@
return
}
var data = res.data || {}
- that.scoreMode = data.scoreMode || 'legacy'
+ that.scoreMode = data.scoreMode || 'twoStage'
that.defaultProfileCode = data.defaultProfileCode || 'default'
that.showRuleJson = false
that.showAllPathTags = false
@@ -361,8 +365,18 @@
this.$message.warning('榛樿妯℃澘缂栫爜娌℃湁瀵瑰簲妯℃澘')
return
}
+ var defaultProfile = null
+ for (var i = 0; i < this.profiles.length; i++) {
+ if (this.profiles[i].profileCode === this.defaultProfileCode) {
+ defaultProfile = this.profiles[i]
+ break
+ }
+ }
+ if (!defaultProfile || Number(defaultProfile.status) !== 1) {
+ this.$message.warning('榛樿妯℃澘蹇呴』鍚敤')
+ return
+ }
var payload = {
- scoreMode: this.scoreMode,
defaultProfileCode: this.defaultProfileCode,
profiles: this.profiles.map(this.sanitizeProfileForSave),
rules: this.rules.map(this.sanitizeRuleForSave)
@@ -1140,6 +1154,13 @@
},
normalizeProfile: function (raw) {
var config = Object.assign({}, this.defaultProfileConfig(), this.parseJson(raw.configJson) || raw.config || {})
+ config.stationPathLenWeightPercent = this.toNumberSafe(config.stationPathLenWeightPercent)
+ config.stationPathCongWeightPercent = this.toNumberSafe(config.stationPathCongWeightPercent)
+ config.stationPathPassOtherOutStationWeightPercent = this.toNumberSafe(config.stationPathPassOtherOutStationWeightPercent)
+ config.stationPathLenWeightPercent = config.stationPathLenWeightPercent == null ? 50 : config.stationPathLenWeightPercent
+ config.stationPathCongWeightPercent = config.stationPathCongWeightPercent == null ? 50 : config.stationPathCongWeightPercent
+ config.stationPathPassOtherOutStationWeightPercent = config.stationPathPassOtherOutStationWeightPercent == null ? 100 : config.stationPathPassOtherOutStationWeightPercent
+ config.stationPathPassOtherOutStationForceSkip = !!config.stationPathPassOtherOutStationForceSkip
return {
id: raw.id || null,
profileCode: raw.profileCode || '',
@@ -1185,6 +1206,11 @@
return JSON.parse(JSON.stringify(model))
},
sanitizeProfileForSave: function (item) {
+ var config = Object.assign({}, item.config || {})
+ config.stationPathLenWeightPercent = this.toNumberSafe(config.stationPathLenWeightPercent) == null ? 50 : this.toNumberSafe(config.stationPathLenWeightPercent)
+ config.stationPathCongWeightPercent = this.toNumberSafe(config.stationPathCongWeightPercent) == null ? 50 : this.toNumberSafe(config.stationPathCongWeightPercent)
+ config.stationPathPassOtherOutStationWeightPercent = this.toNumberSafe(config.stationPathPassOtherOutStationWeightPercent) == null ? 100 : this.toNumberSafe(config.stationPathPassOtherOutStationWeightPercent)
+ config.stationPathPassOtherOutStationForceSkip = !!config.stationPathPassOtherOutStationForceSkip
return {
id: item.id || null,
profileCode: item.profileCode,
@@ -1192,7 +1218,7 @@
priority: Number(item.priority || 100),
status: Number(item.status || 0),
memo: item.memo || '',
- config: Object.assign({}, item.config || {})
+ config: config
}
},
sanitizeRuleForSave: function (item) {
--
Gitblit v1.9.1