Browse Source

修改部分数据错乱问题

Version1.0
YF-yuan 3 years ago
parent
commit
fd8d7a4184
3 changed files with 25 additions and 20 deletions
  1. +22
    -17
      src/views/Home.vue
  2. +1
    -1
      src/views/leftCompoents/landUse.vue
  3. +2
    -2
      src/views/leftCompoents/popupComponents.vue

+ 22
- 17
src/views/Home.vue View File

@@ -89,15 +89,14 @@
<span>{{ item.name }}</span>
</template>
<el-menu-item-group>
<el-submenu :index="index + '-1'">
<template slot="title">反演结果</template>
<el-menu-item v-for="($item, $index) in item.item"
:key="$index" :index="index + '-1' + $index" @click="selectParams($item.type,$item.value, index, $index)">{{$item.name}}: {{ $item.cf }}</el-menu-item>
</el-submenu>
:key="$index" :index="index + $index+1+''" @click="selectParams($item.type, $item.value, index, $index)">{{$item.name}}: {{ $item.cf }}</el-menu-item>
</el-menu-item-group>
<el-menu-item-group>
<template slot="title">反演参照</template>
<el-menu-item v-for="($item, $index) in refList"
:key="$index" :index="index + '-2'">
:key="$index" :index="index + '-5'">
<input
:id="'tip'+index+'-2'+$index"
type="checkbox"
@@ -115,14 +114,15 @@
<div class="markBox">
<!-- 色带 -->
<div class="colorMark" v-if="showColor">
<!-- <p class="colorTitle">{{ colorHL.type }}</p> -->
<div class="colorMain">
<p class="colorImg" alt=""></p>
<p class="colorValue">
<span>{{colorHL&&colorHL.value.low}}</span>
<span v-if="checkedParams=='tp'">单位:μg/L</span>
<span v-if="checkedParams=='tp'">{{colorHL&&colorHL.value.high*100}}</span>
<span v-else>单位:mg/L</span>
<span>{{colorHL&&colorHL.value.high}}</span>
<span v-else>{{colorHL&&colorHL.value.high}}</span>
</p>
</div>
</div>
@@ -322,8 +322,12 @@ export default {
components: { pointQulity, landUse, popupCompoents, placeComponent, outletComponents },
watch: {
isPoint(newValue) {
},
checked:{
deep:true,
handler(){
}
}

},
created() {
// 采样点数据
@@ -389,7 +393,6 @@ export default {
for (var key in paramVaules) {
this.allPointList.push(paramVaules[key]);
}
console.log(this.allPointList, '获取全部采样点信息');
});
let icon = new Style({
image: new Icon({
@@ -715,7 +718,6 @@ export default {
this.select = new Select({
style:(feature)=>{
console.log(feature.getProperties().geom)
let properties = feature.getProperties();
if (properties.geom instanceof Point) {
if(properties.river) { // 表示为采样点数据
@@ -735,13 +737,13 @@ export default {
this.map.removeOverlay(this.overlayPlace);
if(properties.river) { // 表示为采样点数据
this.popupData = properties;
console.log(this.popupData);
let coordinate = e.mapBrowserEvent.coordinate;
this.overlay.setPosition(coordinate);
this.overlay.setOffset([140, -10]);
this.map.removeOverlay(this.overlayOutlet)
this.map.addOverlay(this.overlay);
} else { // 表示为排口数据
console.log(properties);
this.popupOutlet = properties
let coordinate = e.mapBrowserEvent.coordinate;
this.overlayOutlet.setPosition(coordinate);
@@ -807,10 +809,12 @@ export default {
}
// 1-2 采样点显示
if ($index == 1) {
if (index == 1) {
if (index == 0) {
index = 2;
} else if (index == 1) {
index = 0;
} else if (index == 2) {
index = 1;
index = 1
}
if($event.target.checked) {
// 设置初始采样点统计图数据
@@ -984,7 +988,6 @@ export default {
choosePointItem(item, index) {
this.isParams = item
this.checkedPointParams = index;
console.log(item);
this.pointParamsData = this.pointList[item];
},
// 自定义事件关闭弹出框
@@ -1129,17 +1132,17 @@ body {
}

/deep/ .el-menu-item {
padding-left: 30px !important;
padding-left: 40px !important;
font-size: 12px;
position: relative;
}
/deep/ .el-menu-item-group .el-submenu__title {
font-weight: 400;
font-size: 12px;
padding-left: 30px !important;
padding-left: 40px !important;
}
/deep/.el-menu-item-group .el-submenu .el-menu .el-menu-item {
padding-left: 45px !important;
padding-left: 50px !important;
}
/deep/ .el-submenu__title {
height: 40px;
@@ -1154,7 +1157,9 @@ body {
background-color: #e0e8f0;
}
/deep/.el-menu-item-group .el-menu-item-group__title {
padding: 0 !important;
padding-left: 25px !important;
font-size: 13px;
color: #333;
}
.el-menu-item.is-active {
color: #333;

+ 1
- 1
src/views/leftCompoents/landUse.vue View File

@@ -104,7 +104,7 @@ chart
  .label('ratio', (ratio) => {
    return {
      content: (data) => {
        return `${data.lc.substr(0, 2) + '...'}: ${parseFloat(ratio).toFixed(2)}%`;
        return `${data.lc.substr(0, 4) + '...'} ${parseFloat(ratio).toFixed(2)}%`;
      },
    };
  })

+ 2
- 2
src/views/leftCompoents/popupComponents.vue View File

@@ -15,8 +15,8 @@
<span class="upImg" v-show="dataList.tn > 1"></span>
</li>
<li class="value">
<span>TP:{{((dataList.tp)/1000).toFixed(2)}} mg/L</span>
<span class="upImg" v-show="dataList.tp > 0.2"></span>
<span>TP:{{dataList.tp}} μg/L</span>
<span class="upImg" v-show="dataList.tp > 200"></span>
</li>
<li class="value">
<span>NH4_N:{{dataList.nh4_n}} mg/L</span>

Loading…
Cancel
Save