#
Junjie
14 小时以前 bf4e43c1fd1a361029e7cb51daac378fa5ee3617
src/main/webapp/static/js/stationPathPolicy/stationPathPolicy.js
@@ -16,6 +16,7 @@
        s2DeadlockWeight: 8.0,
        s2RunBlockWeight: 10.0,
        s2LoopLoadWeight: 12.0,
        circleMaxLoadLimit: 80.0,
        stationPathLenWeightPercent: 50,
        stationPathCongWeightPercent: 50,
        stationPathPassOtherOutStationWeightPercent: 100,
@@ -1156,9 +1157,11 @@
        },
        normalizeProfile: function (raw) {
            var config = Object.assign({}, this.defaultProfileConfig(), this.parseJson(raw.configJson) || raw.config || {})
            config.circleMaxLoadLimit = this.toNumberSafe(config.circleMaxLoadLimit)
            config.stationPathLenWeightPercent = this.toNumberSafe(config.stationPathLenWeightPercent)
            config.stationPathCongWeightPercent = this.toNumberSafe(config.stationPathCongWeightPercent)
            config.stationPathPassOtherOutStationWeightPercent = this.toNumberSafe(config.stationPathPassOtherOutStationWeightPercent)
            config.circleMaxLoadLimit = config.circleMaxLoadLimit == null ? 80 : config.circleMaxLoadLimit
            config.stationPathLenWeightPercent = config.stationPathLenWeightPercent == null ? 50 : config.stationPathLenWeightPercent
            config.stationPathCongWeightPercent = config.stationPathCongWeightPercent == null ? 50 : config.stationPathCongWeightPercent
            config.stationPathPassOtherOutStationWeightPercent = config.stationPathPassOtherOutStationWeightPercent == null ? 100 : config.stationPathPassOtherOutStationWeightPercent
@@ -1209,6 +1212,7 @@
        },
        sanitizeProfileForSave: function (item) {
            var config = Object.assign({}, item.config || {})
            config.circleMaxLoadLimit = this.toNumberSafe(config.circleMaxLoadLimit) == null ? 80 : this.toNumberSafe(config.circleMaxLoadLimit)
            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)
@@ -1306,6 +1310,16 @@
            var num = Number(value)
            return isNaN(num) ? null : num
        },
        displayLoadLimitPercent: function (value) {
            var num = this.toNumberSafe(value)
            if (num == null) {
                num = 80
            }
            if (num <= 1) {
                num = num * 100
            }
            return num.toFixed(1) + '%'
        },
        notNull: function (value) {
            return value != null
        },