Commit a883fb95 authored by liushuai's avatar liushuai

Merge remote-tracking branch 'origin/master'

parents 090f41a9 b0d3cd64
......@@ -76,30 +76,42 @@ export function getOption(data1) {
export function getOption2(data) {
console.log(data)
export function getOption2(res) {
let seriesList = []
let col = data["决策单元"]
let col = []
let leg = []
for (let item in data) {
console.log(item)
if(item == "决策单元" || item == "有效性") {
continue;
let header = res['header']//["决策单元",'技术效益(BCC)','规模效益(CCR/BCC)','综合技术效益(CCR)']
let data = res['data']
for(let i in header){
console.log(header[i])
let litem = header[i]
let datalist = []
for (let j in data) {
let ditem = data[j]
let value = ditem[litem]
if(litem == "决策单元") {
col.push(value)
continue;
}
if(litem == "有效性") {
continue;
}
datalist.push(value)
}
let obj = {
name: item,
type: 'line',
data: data[item]
if(litem != "决策单元" && litem != "有效性") {
leg.push(litem)
let obj = {
name: litem,
type: 'line',
data: datalist
}
seriesList.push(obj)
}
leg.push(item)
seriesList.push(obj)
}
}
console.log(col)
console.log(seriesList)
let option = {
title: {
text: '效益有效性分析'
......@@ -132,4 +144,4 @@ export function getOption2(data) {
series: seriesList
};
return option;
}
\ No newline at end of file
}
......@@ -529,14 +529,22 @@
"args_y": JSON.stringify(this.choose_args2),
"args_z": JSON.stringify(this.choose_args3),
}
runDEAAlgo(params).then(res => {
console.log("算法执行结果")
console.log(res)
this.hasResult = true
this.algoRes = {title: "数据包络分析(DEA)_编号_身高cm_负荷时间"}//res.data;
}).catch(err => {
console.log(err)
})
this.hasResult = true
this.algoRes = //res.data;
{title: "数据包络分析(DEA)_编号_身高cm_负荷时间",
res11: {header:["决策单元",'技术效益(BCC)','规模效益(CCR/BCC)','综合技术效益(CCR)','有效性'],data:[{"决策单元":0,'技术效益(BCC)':0.907106846851185,'规模效益(CCR/BCC)':0.988628931300419,'综合技术效益(CCR)':0.89679207257778,'有效性':'非 DEA 有效'},{"决策单元":1,'技术效益(BCC)':0.3,'规模效益(CCR/BCC)':0.1,'综合技术效益(CCR)':0.2,'有效性':'DEA 强有效'}],
},
res22: {header:['技术效益(BCC)','规模效益(CCR/BCC)','综合技术效益(CCR)'],data:[{'技术效益(BCC)':0.907106846851185,'规模效益(CCR/BCC)':0.988628931300419,'综合技术效益(CCR)':0.89679207257778},{'技术效益(BCC)':0.3,'规模效益(CCR/BCC)':0.1,'综合技术效益(CCR)':0.2}]},
}
// runDEAAlgo(params).then(res => {
// console.log("算法执行结果")
// console.log(res)
// this.hasResult = true
// this.algoRes = //res.data;
// {title: "数据包络分析(DEA)_编号_身高cm_负荷时间"}
// }).catch(err => {
// console.log(err)
// })
},
run() {
if(this.selectAlgo.key == "DEA") {
......
......@@ -6,7 +6,7 @@
</div>
<div v-if="loading" style="position: absolute; top: 41px; right:0px; left:0px; bottom:0px;overflow: scroll;">
<div style="padding-bottom: 100px;">
<div style="width: 100%; height:200px;margin:10px 50px;">
<div style="width: 100%; height:100px;margin:10px 50px;">
<span style="font-weight:600;font-size:16px">算法结果描述</span>
</div>
<div style="margin:50px;">
......@@ -41,7 +41,7 @@
<el-table
border
stripe
height="100%"
height="100%"
:data="tableData1"
:style="{'width': '100%', 'height': '100%'}">
<template v-for="item in tableHeader1">
......@@ -63,7 +63,9 @@
<script>
import { getOption2 } from "@/utils/echartsUtil"
import VabChart from '@/plugins/echarts'
import * as echarts from 'echarts';
import VabChart from '@/plugins/echarts'
//引入echarts
export default {
name: 'res1',
props: {
......@@ -73,7 +75,7 @@ export default {
}
},
components: {
VabChart
VabChart
},
data() {
return {
......@@ -97,14 +99,14 @@ export default {
let res1 = this.algoRes["res11"]
let header = res1["header"]
this.tableHeader = header;
this.tableData = JSON.parse(res1["data"])
this.tableData = res1["data"]
let res2 = this.algoRes["res22"]
let header2 = res2["header"]
this.tableHeader1 = header2;
this.tableData1 = JSON.parse(res2["data"])
this.tableData1 = res2["data"]
this.fwl = getOption2(res1["data2"]);
this.fwl = getOption2(res1);
}
......@@ -114,4 +116,4 @@ export default {
<style scoped>
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment