Commit fff86753 authored by wangdong's avatar wangdong

fin

parent 71f1ccd7
<template> <template>
<div> <div>
<el-progress :percentage="process" :format="format" ></el-progress> <el-progress :percentage="process" :format="format" ></el-progress>
<el-popover <!-- <el-popover
placement="right" placement="right"
width="600" width="600"
trigger="hover" trigger="hover"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
slot="reference" slot="reference"
> >
资源利用率提升比例 <span>\({U_A -U_T \over U_T}=\)</span> {{up.toFixed(2)}} <span>\(\%\)</span></br></div> 资源利用率提升比例 <span>\({U_A -U_T \over U_T}=\)</span> {{up.toFixed(2)}} <span>\(\%\)</span></br></div>
</el-popover> </el-popover> -->
<cal-page></cal-page> <cal-page></cal-page>
<d-3-page></d-3-page> <d-3-page></d-3-page>
<!-- <div id='question-id' v-html="newlatex"> <!-- <div id='question-id' v-html="newlatex">
...@@ -61,7 +61,8 @@ export default { ...@@ -61,7 +61,8 @@ export default {
return { return {
process: 0, process: 0,
works_requires:[1.98,2.0,3.39,4.69,6.01,7.35,8.69,10.01,11.4,12.79,14.01,15.41,16], works_requires:[1.98,2.0,3.39,4.69,6.01,7.35,8.69,10.01,11.4,12.79,14.01,15.41,16],
requires: [[1.98, 1.98, 1.98], [1.98, 1.98, 2.0], [1.98, 1.98, 3.39], [1.98, 1.98, 4.69], [1.98, 1.98, 6.01], [1.98, 1.98, 7.35], [1.98, 1.98, 8.69], [1.98, 1.98, 10.01], [1.98, 1.98, 11.4], [1.98, 1.98, 12.79], [1.98, 2.0, 1.98], [1.98, 2.0, 2.0], [1.98, 2.0, 3.39], [1.98, 2.0, 4.69], [1.98, 2.0, 6.01], [1.98, 2.0, 7.35], [1.98, 2.0, 8.69], [1.98, 2.0, 10.01], [1.98, 2.0, 11.4], [1.98, 2.0, 12.79], [1.98, 3.39, 1.98], [1.98, 3.39, 2.0], [1.98, 3.39, 3.39], [1.98, 3.39, 4.69], [1.98, 3.39, 6.01], [1.98, 3.39, 7.35], [1.98, 3.39, 8.69], [1.98, 3.39, 10.01], [1.98, 3.39, 11.4], [1.98, 4.69, 1.98], [1.98, 4.69, 2.0], [1.98, 4.69, 3.39], [1.98, 4.69, 4.69], [1.98, 4.69, 6.01], [1.98, 4.69, 7.35], [1.98, 4.69, 8.69], [1.98, 4.69, 10.01], [1.98, 6.01, 1.98], [1.98, 6.01, 2.0], [1.98, 6.01, 3.39], [1.98, 6.01, 4.69], [1.98, 6.01, 6.01], [1.98, 6.01, 7.35], [1.98, 6.01, 8.69], [1.98, 7.35, 1.98], [1.98, 7.35, 2.0], [1.98, 7.35, 3.39], [1.98, 7.35, 4.69], [1.98, 7.35, 6.01], [1.98, 7.35, 7.35], [1.98, 8.69, 1.98], [1.98, 8.69, 2.0], [1.98, 8.69, 3.39], [1.98, 8.69, 4.69], [1.98, 8.69, 6.01], [1.98, 10.01, 1.98], [1.98, 10.01, 2.0], [1.98, 10.01, 3.39], [1.98, 10.01, 4.69], [1.98, 11.4, 1.98], [1.98, 11.4, 2.0], [1.98, 11.4, 3.39], [1.98, 12.79, 1.98], [1.98, 12.79, 2.0], [2.0, 1.98, 1.98], [2.0, 1.98, 2.0], [2.0, 1.98, 3.39], [2.0, 1.98, 4.69], [2.0, 1.98, 6.01], [2.0, 1.98, 7.35], [2.0, 1.98, 8.69], [2.0, 1.98, 10.01], [2.0, 1.98, 11.4], [2.0, 1.98, 12.79], [2.0, 2.0, 1.98], [2.0, 2.0, 2.0], [2.0, 2.0, 3.39], [2.0, 2.0, 4.69], [2.0, 2.0, 6.01], [2.0, 2.0, 7.35], [2.0, 2.0, 8.69], [2.0, 2.0, 10.01], [2.0, 2.0, 11.4], [2.0, 2.0, 12.79], [2.0, 3.39, 1.98], [2.0, 3.39, 2.0], [2.0, 3.39, 3.39], [2.0, 3.39, 4.69], [2.0, 3.39, 6.01], [2.0, 3.39, 7.35], [2.0, 3.39, 8.69], [2.0, 3.39, 10.01], [2.0, 3.39, 11.4], [2.0, 4.69, 1.98], [2.0, 4.69, 2.0], [2.0, 4.69, 3.39], [2.0, 4.69, 4.69], [2.0, 4.69, 6.01], [2.0, 4.69, 7.35], [2.0, 4.69, 8.69], [2.0, 4.69, 10.01], [2.0, 6.01, 1.98], [2.0, 6.01, 2.0], [2.0, 6.01, 3.39], [2.0, 6.01, 4.69], [2.0, 6.01, 6.01], [2.0, 6.01, 7.35], [2.0, 6.01, 8.69], [2.0, 7.35, 1.98], [2.0, 7.35, 2.0], [2.0, 7.35, 3.39], [2.0, 7.35, 4.69], [2.0, 7.35, 6.01], [2.0, 7.35, 7.35], [2.0, 8.69, 1.98], [2.0, 8.69, 2.0], [2.0, 8.69, 3.39], [2.0, 8.69, 4.69], [2.0, 8.69, 6.01], [2.0, 10.01, 1.98], [2.0, 10.01, 2.0], [2.0, 10.01, 3.39], [2.0, 10.01, 4.69], [2.0, 11.4, 1.98], [2.0, 11.4, 2.0], [2.0, 11.4, 3.39], [2.0, 12.79, 1.98], [2.0, 12.79, 2.0], [3.39, 1.98, 1.98], [3.39, 1.98, 2.0], [3.39, 1.98, 3.39], [3.39, 1.98, 4.69], [3.39, 1.98, 6.01], [3.39, 1.98, 7.35], [3.39, 1.98, 8.69], [3.39, 1.98, 10.01], [3.39, 1.98, 11.4], [3.39, 2.0, 1.98], [3.39, 2.0, 2.0], [3.39, 2.0, 3.39], [3.39, 2.0, 4.69], [3.39, 2.0, 6.01], [3.39, 2.0, 7.35], [3.39, 2.0, 8.69], [3.39, 2.0, 10.01], [3.39, 2.0, 11.4], [3.39, 3.39, 1.98], [3.39, 3.39, 2.0], [3.39, 3.39, 3.39], [3.39, 3.39, 4.69], [3.39, 3.39, 6.01], [3.39, 3.39, 7.35], [3.39, 3.39, 8.69], [3.39, 3.39, 10.01], [3.39, 4.69, 1.98], [3.39, 4.69, 2.0], [3.39, 4.69, 3.39], [3.39, 4.69, 4.69], [3.39, 4.69, 6.01], [3.39, 4.69, 7.35], [3.39, 4.69, 8.69], [3.39, 6.01, 1.98], [3.39, 6.01, 2.0], [3.39, 6.01, 3.39], [3.39, 6.01, 4.69], [3.39, 6.01, 6.01], [3.39, 6.01, 7.35], [3.39, 7.35, 1.98], [3.39, 7.35, 2.0], [3.39, 7.35, 3.39], [3.39, 7.35, 4.69], [3.39, 7.35, 6.01], [3.39, 8.69, 1.98], [3.39, 8.69, 2.0], [3.39, 8.69, 3.39], [3.39, 8.69, 4.69], [3.39, 10.01, 1.98], [3.39, 10.01, 2.0], [3.39, 10.01, 3.39], [3.39, 11.4, 1.98], [3.39, 11.4, 2.0], [4.69, 1.98, 1.98], [4.69, 1.98, 2.0], [4.69, 1.98, 3.39], [4.69, 1.98, 4.69], [4.69, 1.98, 6.01], [4.69, 1.98, 7.35], [4.69, 1.98, 8.69], [4.69, 1.98, 10.01], [4.69, 2.0, 1.98], [4.69, 2.0, 2.0], [4.69, 2.0, 3.39], [4.69, 2.0, 4.69], [4.69, 2.0, 6.01], [4.69, 2.0, 7.35], [4.69, 2.0, 8.69], [4.69, 2.0, 10.01], [4.69, 3.39, 1.98], [4.69, 3.39, 2.0], [4.69, 3.39, 3.39], [4.69, 3.39, 4.69], [4.69, 3.39, 6.01], [4.69, 3.39, 7.35], [4.69, 3.39, 8.69], [4.69, 4.69, 1.98], [4.69, 4.69, 2.0], [4.69, 4.69, 3.39], [4.69, 4.69, 4.69], [4.69, 4.69, 6.01], [4.69, 4.69, 7.35], [4.69, 6.01, 1.98], [4.69, 6.01, 2.0], [4.69, 6.01, 3.39], [4.69, 6.01, 4.69], [4.69, 6.01, 6.01], [4.69, 7.35, 1.98], [4.69, 7.35, 2.0], [4.69, 7.35, 3.39], [4.69, 7.35, 4.69], [4.69, 8.69, 1.98], [4.69, 8.69, 2.0], [4.69, 8.69, 3.39], [4.69, 10.01, 1.98], [4.69, 10.01, 2.0], [6.01, 1.98, 1.98], [6.01, 1.98, 2.0], [6.01, 1.98, 3.39], [6.01, 1.98, 4.69], [6.01, 1.98, 6.01], [6.01, 1.98, 7.35], [6.01, 1.98, 8.69], [6.01, 2.0, 1.98], [6.01, 2.0, 2.0], [6.01, 2.0, 3.39], [6.01, 2.0, 4.69], [6.01, 2.0, 6.01], [6.01, 2.0, 7.35], [6.01, 2.0, 8.69], [6.01, 3.39, 1.98], [6.01, 3.39, 2.0], [6.01, 3.39, 3.39], [6.01, 3.39, 4.69], [6.01, 3.39, 6.01], [6.01, 3.39, 7.35], [6.01, 4.69, 1.98], [6.01, 4.69, 2.0], [6.01, 4.69, 3.39], [6.01, 4.69, 4.69], [6.01, 4.69, 6.01], [6.01, 6.01, 1.98], [6.01, 6.01, 2.0], [6.01, 6.01, 3.39], [6.01, 6.01, 4.69], [6.01, 7.35, 1.98], [6.01, 7.35, 2.0], [6.01, 7.35, 3.39], [6.01, 8.69, 1.98], [6.01, 8.69, 2.0], [7.35, 1.98, 1.98], [7.35, 1.98, 2.0], [7.35, 1.98, 3.39], [7.35, 1.98, 4.69], [7.35, 1.98, 6.01], [7.35, 1.98, 7.35], [7.35, 2.0, 1.98], [7.35, 2.0, 2.0], [7.35, 2.0, 3.39], [7.35, 2.0, 4.69], [7.35, 2.0, 6.01], [7.35, 2.0, 7.35], [7.35, 3.39, 1.98], [7.35, 3.39, 2.0], [7.35, 3.39, 3.39], [7.35, 3.39, 4.69], [7.35, 3.39, 6.01], [7.35, 4.69, 1.98], [7.35, 4.69, 2.0], [7.35, 4.69, 3.39], [7.35, 4.69, 4.69], [7.35, 6.01, 1.98], [7.35, 6.01, 2.0], [7.35, 6.01, 3.39], [7.35, 7.35, 1.98], [7.35, 7.35, 2.0], [8.69, 1.98, 1.98], [8.69, 1.98, 2.0], [8.69, 1.98, 3.39], [8.69, 1.98, 4.69], [8.69, 1.98, 6.01], [8.69, 2.0, 1.98], [8.69, 2.0, 2.0], [8.69, 2.0, 3.39], [8.69, 2.0, 4.69], [8.69, 2.0, 6.01], [8.69, 3.39, 1.98], [8.69, 3.39, 2.0], [8.69, 3.39, 3.39], [8.69, 3.39, 4.69], [8.69, 4.69, 1.98], [8.69, 4.69, 2.0], [8.69, 4.69, 3.39], [8.69, 6.01, 1.98], [8.69, 6.01, 2.0], [10.01, 1.98, 1.98], [10.01, 1.98, 2.0], [10.01, 1.98, 3.39], [10.01, 1.98, 4.69], [10.01, 2.0, 1.98], [10.01, 2.0, 2.0], [10.01, 2.0, 3.39], [10.01, 2.0, 4.69], [10.01, 3.39, 1.98], [10.01, 3.39, 2.0], [10.01, 3.39, 3.39], [10.01, 4.69, 1.98], [10.01, 4.69, 2.0], [11.4, 1.98, 1.98], [11.4, 1.98, 2.0], [11.4, 1.98, 3.39], [11.4, 2.0, 1.98], [11.4, 2.0, 2.0], [11.4, 2.0, 3.39], [11.4, 3.39, 1.98], [11.4, 3.39, 2.0], [12.79, 1.98, 1.98], [12.79, 1.98, 2.0], [12.79, 2.0, 1.98], [12.79, 2.0, 2.0]], requires:[[1.98, 1.98, 1.98], [1.98, 1.98, 2.0], [1.98, 1.98, 3.39], [1.98, 2.0, 1.98], [1.98, 2.0, 2.0], [1.98, 2.0, 3.39], [1.98, 3.39, 1.98], [1.98, 3.39, 2.0], [2.0, 1.98, 1.98], [2.0, 1.98, 2.0], [2.0, 1.98, 3.39], [2.0, 2.0, 1.98], [2.0, 2.0, 2.0], [2.0, 2.0, 3.39], [2.0, 3.39, 1.98], [2.0, 3.39, 2.0], [3.39, 1.98, 1.98], [3.39, 1.98, 2.0], [3.39, 2.0, 1.98], [3.39, 2.0, 2.0]],
// requires: [[1.98, 1.98, 1.98], [1.98, 1.98, 2.0], [1.98, 1.98, 3.39], [1.98, 1.98, 4.69], [1.98, 1.98, 6.01], [1.98, 1.98, 7.35], [1.98, 2.0, 1.98], [1.98, 2.0, 2.0], [1.98, 2.0, 3.39], [1.98, 2.0, 4.69], [1.98, 2.0, 6.01], [1.98, 2.0, 7.35], [1.98, 3.39, 1.98], [1.98, 3.39, 2.0], [1.98, 3.39, 3.39], [1.98, 3.39, 4.69], [1.98, 3.39, 6.01], [1.98, 4.69, 1.98], [1.98, 4.69, 2.0], [1.98, 4.69, 3.39], [1.98, 4.69, 4.69], [1.98, 6.01, 1.98], [1.98, 6.01, 2.0], [1.98, 6.01, 3.39], [1.98, 7.35, 1.98], [1.98, 7.35, 2.0], [2.0, 1.98, 1.98], [2.0, 1.98, 2.0], [2.0, 1.98, 3.39], [2.0, 1.98, 4.69], [2.0, 1.98, 6.01], [2.0, 1.98, 7.35], [2.0, 2.0, 1.98], [2.0, 2.0, 2.0], [2.0, 2.0, 3.39], [2.0, 2.0, 4.69], [2.0, 2.0, 6.01], [2.0, 2.0, 7.35], [2.0, 3.39, 1.98], [2.0, 3.39, 2.0], [2.0, 3.39, 3.39], [2.0, 3.39, 4.69], [2.0, 3.39, 6.01], [2.0, 4.69, 1.98], [2.0, 4.69, 2.0], [2.0, 4.69, 3.39], [2.0, 4.69, 4.69], [2.0, 6.01, 1.98], [2.0, 6.01, 2.0], [2.0, 6.01, 3.39], [2.0, 7.35, 1.98], [2.0, 7.35, 2.0], [3.39, 1.98, 1.98], [3.39, 1.98, 2.0], [3.39, 1.98, 3.39], [3.39, 1.98, 4.69], [3.39, 1.98, 6.01], [3.39, 2.0, 1.98], [3.39, 2.0, 2.0], [3.39, 2.0, 3.39], [3.39, 2.0, 4.69], [3.39, 2.0, 6.01], [3.39, 3.39, 1.98], [3.39, 3.39, 2.0], [3.39, 3.39, 3.39], [3.39, 3.39, 4.69], [3.39, 4.69, 1.98], [3.39, 4.69, 2.0], [3.39, 4.69, 3.39], [3.39, 6.01, 1.98], [3.39, 6.01, 2.0], [4.69, 1.98, 1.98], [4.69, 1.98, 2.0], [4.69, 1.98, 3.39], [4.69, 1.98, 4.69], [4.69, 2.0, 1.98], [4.69, 2.0, 2.0], [4.69, 2.0, 3.39], [4.69, 2.0, 4.69], [4.69, 3.39, 1.98], [4.69, 3.39, 2.0], [4.69, 3.39, 3.39], [4.69, 4.69, 1.98], [4.69, 4.69, 2.0], [6.01, 1.98, 1.98], [6.01, 1.98, 2.0], [6.01, 1.98, 3.39], [6.01, 2.0, 1.98], [6.01, 2.0, 2.0], [6.01, 2.0, 3.39], [6.01, 3.39, 1.98], [6.01, 3.39, 2.0], [7.35, 1.98, 1.98], [7.35, 1.98, 2.0], [7.35, 2.0, 1.98], [7.35, 2.0, 2.0]],
hover: false, hover: false,
utilization_a: 2, utilization_a: 2,
questionToOptions: "", questionToOptions: "",
...@@ -153,6 +154,7 @@ export default { ...@@ -153,6 +154,7 @@ export default {
}, },
mounted() { mounted() {
//this.requires.push=[[2.5, 4, 5],[6.5, 4, 5],[5, 3, 7.5]] //this.requires.push=[[2.5, 4, 5],[6.5, 4, 5],[5, 3, 7.5]]
//
this.count(); this.count();
}, },
methods: { methods: {
......
...@@ -31,7 +31,14 @@ const mutations = { ...@@ -31,7 +31,14 @@ const mutations = {
} }
, ,
up(state, obj) { up(state, obj) {
return state.up = obj.up; if(state.ups.length==120){
state.ups.push(obj.up).shift()
}
else{
state.ups.push(obj.up)
}
return state.up = avg(state.ups);
} }
} }
const resize_ = (arr)=>{ const resize_ = (arr)=>{
...@@ -40,4 +47,13 @@ const mutations = { ...@@ -40,4 +47,13 @@ const mutations = {
} }
return arr return arr
} }
const avg = (arr)=>{
let add =0
for( let i in arr){
add +=arr[i]
}
console.log(add)
console.log(add/arr.length)
return add/arr.length
}
export default mutations; export default mutations;
\ No newline at end of file
const state = { const state = {
flag:true, flag:true,
up:0, up:0,
ups:[],
slice_info:[], slice_info:[],
ue_list:[], ue_list:[],
ue_list1:[], ue_list1:[],
......
...@@ -233,7 +233,7 @@ export default function legend() { ...@@ -233,7 +233,7 @@ export default function legend() {
} }
export function timechart(g, width, height, duration, mode) { export function timechart(g, width, height, duration, mode) {
var legend =g
var x_values = []; var x_values = [];
var y_values = []; var y_values = [];
var y = d3.scaleLog() var y = d3.scaleLog()
...@@ -260,15 +260,15 @@ export function timechart(g, width, height, duration, mode) { ...@@ -260,15 +260,15 @@ export function timechart(g, width, height, duration, mode) {
} }
else { else {
y = d3.scaleSqrt() y = d3.scaleLinear()
.range([height, 0]) .range([height, 0])
.domain([0, 400]) .domain([1, 100])
var y_axis = g.append("g") var y_axis = g.append("g")
.attr("class", "axis y") .attr("class", "axis y")
.attr("transform", "translate(" + width + ")") .attr("transform", "translate(" + width + ")")
.call(d3.axisRight(y) .call(d3.axisRight(y)
.tickFormat(d3.format('.2s')) .tickFormat(d3.format('.2s'))
.tickValues([30, 100,400]) .tickValues([0,30,50,100])
// .tickSize(-width) // .tickSize(-width)
); );
} }
...@@ -384,11 +384,52 @@ export function timechart(g, width, height, duration, mode) { ...@@ -384,11 +384,52 @@ export function timechart(g, width, height, duration, mode) {
} }
} }
function text(text,text1){
console.log(legend.selectAll("#rates"))
if(legend.selectAll("#rates")._groups[0].length==1){
legend.select("#rates")
.text(function (d) {
return '';
})
.text(function (d) {
return text.toFixed(1)+'%';
});
legend.select("#rates1")
.text(function (d) {
return '';
})
.text(function (d) {
return Number(text1*1.0).toFixed(1)+'%';
});
}
if(legend.selectAll("#rates")._groups[0].length==0){
legend
.append("text")
.attr("transform", "translate(" + 580 + "," + 50 + ")")
.attr("id", "rates")
.style("text-anchor", "end") //样式对齐
.text(function (d) {
return text.toFixed(1)+'%';
});
legend
.append("text")
.attr("transform", "translate(" + 580 + "," + 110+ ")")
.attr("id", "rates1")
.style("text-anchor", "end") //样式对齐
.text(function (d) {
return Number(text1*1.0).toFixed(1)+'%';
});
}
}
return { return {
append: append append: append,
text: text,
}; };
} }
export function append(time, sample) { export function append(time, sample) {
......
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