修改误差图以及面包屑导航

tykong-cidian
duxiaoning 2023-10-09 13:52:02 +08:00
parent 21c5cece0b
commit 31ea18fbc4
9 changed files with 175 additions and 30 deletions

View File

@ -16,7 +16,7 @@
"cesium": "1.68",
"cesium-navigation-es6": "^1.0.9",
"core-js": "^3.6.5",
"echarts": "^4.9.0",
"echarts": "5.4.1",
"echarts-stat": "^1.2.0",
"element-ui": "^2.15.5",
"jquery": "^3.5.1",

View File

@ -200,7 +200,6 @@ export async function getUserInfo(token) {
return request({
url: "/app/logincheck?token=" + token,
method: "get",
// baseURL: "http://124.16.188.131:18030/yunguan-app"
baseURL: process.env.VUE_APP_BASE_API+"/yunguan-app"
});
}

View File

@ -121,6 +121,16 @@
<span>选取点</span>
</div>
</div>
<!-- <div class="erTip" v-else>
<div class="echartReg">
<span class="echartRegName"></span>
<span>{{ erExpression }}</span>
</div>
<div class="echartReg" v-show="erR2 !== null">
<span class="echartRegName"></span>
<span>{{ erR2 }}</span>
</div>
</div> -->
</div>
</div>
</div>
@ -166,6 +176,8 @@ export default {
tData: {},
tDatas: null,
midValue: 10,
erExpression: null,
erR2: "0.037207",
};
},
created() {
@ -316,25 +328,113 @@ export default {
xArr.push(errorVala[i].cre_imageValue);
data.push(a);
}
const x_limit = Math.abs(Math.max(...xArr) / xArr.length);
// const x_limit = Math.abs(Math.max(...xArr) / xArr.length);
//
// var myRegression = this.$ecstat.regression("polynomial", data, 3);
let myRegression = this.$ecstat.regression("linear", data);
myRegression.points.sort(function (a, b) {
return a[0] - b[0];
});
let myRegression = this.echartRegression("polynomial", data, 1);
var option = {
title: {
text: this.pdSubTypeName + "误差结果图",
left: "center",
top: 16,
},
animation: false,
grid: {
right: "15%",
bottom: "25%",
},
toolbox: {
show: true,
orient: "vertical",
top: 10,
feature: {
dataZoom: {
title: {
zoom: "区域缩放",
back: "缩放还原",
},
yAxisIndex: "none",
},
myTool1: {
show: true,
title: "多项式回归1次",
icon: "path://M272.5,285.5h332m-171-137v296m89-224c-85.7,61.79-199.22,144.16-199,144",
onclick: () => {
myRegression = this.echartRegression("polynomial", data, 1);
option.series[1].data = myRegression.points;
this.myCharts.setOption(option);
},
},
myTool2: {
show: true,
title: "多项式回归2次",
icon: "path://M272.5,285.5h332m-171-137v296M338,219.21c5,112.41,55.28,190.63,93,192.37,38.46,1.77,90.59-74.67,91.71-192.82",
onclick: () => {
myRegression = this.echartRegression("polynomial", data, 2);
option.series[1].data = myRegression.points;
this.myCharts.setOption(option);
},
},
myTool3: {
show: true,
title: "多项式回归3次",
icon: "path://M272.5,285.5h332m-171-137v296M590,227c-24.25,54.05-59.27,114.65-98.35,113.21-51.58-1.9-71.15-110.45-119.35-110.68-21.39-.1-51.7,21.12-88.8,120",
onclick: () => {
myRegression = this.echartRegression("polynomial", data, 3);
option.series[1].data = myRegression.points;
this.myCharts.setOption(option);
},
},
restore: {
title: "还原",
icon: "path://M2.5 2v6h6M2.66 15.57a10 10 0 1 0 .57-8.38",
},
saveAsImage: {
title: "保存为图片",
},
},
},
dataZoom: [
{
type: "slider",
xAxisIndex: 0,
filterMode: "none",
},
{
type: "slider",
yAxisIndex: 0,
filterMode: "none",
right: "60",
},
],
legend: {
top: 20,
right: 45,
// selectedMode: false,
data: [
{
name: "erExpression",
icon: "circle",
},
// {
// name: "r2",
// icon: "circle",
// },
],
formatter: (name) => {
if (name === "erExpression") return this.erExpression;
else if (name === "r2") return this.erR2;
},
},
xAxis: {
name: "像元值(" + this.getProductDes() + "",
nameLocation: "middle",
min: (Math.min(...xArr) - x_limit).toFixed(5),
max: (Math.max(...xArr) + x_limit).toFixed(5),
// min: Number((Math.min(...xArr) - x_limit).toFixed(5)),
// max: Number((Math.max(...xArr) + x_limit).toFixed(5)),
nameTextStyle: {
lineHeight: 30,
height: 60,
fontWeight: "bold",
// fontWeight: "bold",
fontSize: 13,
},
},
yAxis: {
@ -342,28 +442,34 @@ export default {
nameTextStyle: {
lineHeight: 30,
height: 60,
fontWeight: "bold",
// fontWeight: "bold",
fontSize: 13,
padding: [0, 0, 10, 0],
},
nameRotate: 90, // rightMiddle
nameLocation: "center", // ynamey
},
series: [
{
name: "r2",
symbolSize: 10,
type: "scatter",
data: data,
},
{
name: "erExpression",
type: "line",
smooth: true,
showSymbol: false,
data: myRegression.points,
itemStyle: {
normal: {
color: "#91cc75",
lineStyle: {
width: 3,
},
},
},
// itemStyle: {
// normal: {
// color: "#91cc75",
// lineStyle: {
// width: 3,
// },
// },
// },
},
],
};
@ -442,6 +548,15 @@ export default {
};
option && this.myCharts.setOption(option);
},
echartRegression(regressionType, data, order) {
//regressionType:'linear', 'exponential', 'logarithmic', 'polynomial'order:number
let myRegression = this.$ecstat.regression(regressionType, data, order);
myRegression.points.sort(function (a, b) {
return a[0] - b[0];
});
this.erExpression = myRegression.expression;
return myRegression;
},
},
};
</script>
@ -539,4 +654,25 @@ export default {
}
}
}
.erTip {
position: absolute;
top: 10px;
right: 26px;
font-size: small;
text-align: end;
.echartReg {
height: 20px;
line-height: 20px;
margin: 0 5px;
.echartRegName {
display: inline-block;
width: 9px;
height: 9px;
background-color: #7a96c6;
// border: 1px solid #7A96C6;
border-radius: 50%;
margin-right: 5px;
}
}
}
</style>

View File

@ -18,6 +18,7 @@ class CesiumUtils {
geocoder: false, //地名查找,默认true
timeline: false, //时间线,默认true
navigationHelpButton: false, //导航帮助说明,默认true
// sceneMode:Cesium.SceneMode.SCENE2D,
sceneModePicker: false, //是否显示投影方式控件
infoBox: false, //点击要素之后显示的信息,默认true
fullscreenButton: false, //全屏按钮,默认显示true

View File

@ -4,7 +4,6 @@ import { Message } from "element-ui";
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// baseURL: 'http://124.16.188.131:18030/', // url = base url + request url
timeout: 5000000 // request timeout
});

View File

@ -22,7 +22,8 @@ Vue.prototype.bus=new Vue();
// 加入moment所有的组件
Vue.prototype.$moment = moment;
// echarts
import echarts from 'echarts' //引入echarts
// import echarts from 'echarts' //引入echarts
import * as echarts from 'echarts';
import ecstat from 'echarts-stat'/*echarts统计组件*/
Vue.prototype.$ecstat = ecstat /*echarts统计组件*/
Vue.prototype.$echarts = echarts; //引入组件

View File

@ -151,9 +151,9 @@ export default {
let that = this;
// breadNumber = 1breadNumber
let breadNumber =
typeof this.$route.meta.breadNumber !== "undefined"
(typeof this.$route.meta.breadNumber !== "undefined"
? this.$route.meta.breadNumber
: 1;
: 1) - 1;
//
let newBread = { name: this.$route.name, path: this.$route.fullPath };
let vuexBreadList = []; //

View File

@ -112,6 +112,7 @@
<div class="box1">
<span class="sp1"></span><span class="sp2">反馈信息</span>
</div>
<hr/>
<el-form :inline="true" :model="unDeal" class="demo-form-inline" ref="feedbackForm" label-width="100px">
<el-form-item label="反馈结果">
<el-radio-group v-model="unDeal.udMsg">
@ -670,13 +671,21 @@ export default {
}
.unableDeal .box1 {
width: 100%;
width: 70%;
position: absolute;
left: 0;
top: 10px;
z-index: 9999;
border: none !important;
}
.unableDeal hr{
width: 99%;
position: absolute;
left: 0.5%;
top: 50px;
border: none;
background-color: #c0c4cc;
height: 1px;
}
/deep/.unableDeal .el-radio {
padding: 0 30px 0 20px;
}

View File

@ -36,7 +36,7 @@ module.exports = {
},
[process.env.VUE_APP_REALITY_API]: {
target: "http://124.16.188.131:18092/microwave",
// target: "http://211.157.180.211:18092/microwave",
// target: "http://192.168.1.104:18092/microwave",
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_REALITY_API]: ""
@ -44,7 +44,7 @@ module.exports = {
},
[process.env.VUE_APP_FILE_API]: {
target: "http://124.16.188.131:18093/file",
// target: "http://211.157.180.211:18093/file",
// target: "http://192.168.1.104:18093/file",
changeOrigin: true,
pathRewrite: {
["^" + process.env.VUE_APP_FILE_API]: ""