|
|
@@ -57,8 +57,6 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
start() {
|
|
|
- this.title = '分析中请等待'
|
|
|
- this.startType = true
|
|
|
var l = this.$refs.LeftBox.stopDateList
|
|
|
if (l && l.length) {
|
|
|
l.map((i) => {
|
|
|
@@ -92,37 +90,12 @@ export default {
|
|
|
} else {
|
|
|
return this.$message.error('请填写完整的开始计划时间和调整计划时间!')
|
|
|
}
|
|
|
- // this.getData(this.data)
|
|
|
+ this.title = '分析中请等待'
|
|
|
+ this.startType = true
|
|
|
+ this.getData(this.data)
|
|
|
},
|
|
|
|
|
|
- getData(data, callback) {
|
|
|
- callback({
|
|
|
- all_results: [
|
|
|
- {
|
|
|
- num_boards: 0,
|
|
|
- time_score: -355.27702702702703
|
|
|
- },
|
|
|
- {
|
|
|
- num_boards: 1,
|
|
|
- time_score: -308.80349511213336
|
|
|
- },
|
|
|
- {
|
|
|
- num_boards: 2,
|
|
|
- time_score: -262.1426045620088
|
|
|
- },
|
|
|
- {
|
|
|
- num_boards: 3,
|
|
|
- time_score: -226.80023155069966
|
|
|
- },
|
|
|
- {
|
|
|
- num_boards: 4,
|
|
|
- time_score: -224.421390070922
|
|
|
- }
|
|
|
- ],
|
|
|
- best_num_boards: 4,
|
|
|
- best_time_score: -224.421390070922,
|
|
|
- mpp_file: null
|
|
|
- })
|
|
|
+ getData(data) {
|
|
|
fetch(getResultList.sgjdmn_analysis, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
@@ -137,16 +110,8 @@ export default {
|
|
|
console.log('分析结果:', r)
|
|
|
this.startType = false
|
|
|
this.title = '开始模拟'
|
|
|
- if (r.code == 1) {
|
|
|
- if (r.result.outcome && r.result.outcome.all_results && r.result.outcome.all_results.length) {
|
|
|
- this.$refs.BottomBox.changeTable(r.result.outcome.all_results, r.result.outcome.best_schedule)
|
|
|
- }
|
|
|
- if (r.result.request) {
|
|
|
- this.$refs.RightBox.changeTable(r.result.request)
|
|
|
- }
|
|
|
- if (r.result.request && r.result.request.rain_intervals && r.result.request.rain_intervals.length) {
|
|
|
- this.$refs.LeftBox.changeTable(r.result.request.rain_intervals)
|
|
|
- }
|
|
|
+ if (r && r.all_results && r.all_results.length) {
|
|
|
+ this.$refs.BottomBox.changeTable(r.all_results, r.best_schedule)
|
|
|
}
|
|
|
})
|
|
|
},
|