Procházet zdrojové kódy

修改部分数据错乱问题

Version1.0
YF-yuan před 3 roky
rodič
revize
fd8d7a4184
3 změnil soubory, kde provedl 25 přidání a 20 odebrání
  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 Zobrazit soubor

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

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


/deep/ .el-menu-item { /deep/ .el-menu-item {
padding-left: 30px !important;
padding-left: 40px !important;
font-size: 12px; font-size: 12px;
position: relative; position: relative;
} }
/deep/ .el-menu-item-group .el-submenu__title { /deep/ .el-menu-item-group .el-submenu__title {
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
padding-left: 30px !important;
padding-left: 40px !important;
} }
/deep/.el-menu-item-group .el-submenu .el-menu .el-menu-item { /deep/.el-menu-item-group .el-submenu .el-menu .el-menu-item {
padding-left: 45px !important;
padding-left: 50px !important;
} }
/deep/ .el-submenu__title { /deep/ .el-submenu__title {
height: 40px; height: 40px;
background-color: #e0e8f0; background-color: #e0e8f0;
} }
/deep/.el-menu-item-group .el-menu-item-group__title { /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 { .el-menu-item.is-active {
color: #333; color: #333;

+ 1
- 1
src/views/leftCompoents/landUse.vue Zobrazit soubor

  .label('ratio', (ratio) => {   .label('ratio', (ratio) => {
    return {     return {
      content: (data) => {       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 Zobrazit soubor

<span class="upImg" v-show="dataList.tn > 1"></span> <span class="upImg" v-show="dataList.tn > 1"></span>
</li> </li>
<li class="value"> <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>
<li class="value"> <li class="value">
<span>NH4_N:{{dataList.nh4_n}} mg/L</span> <span>NH4_N:{{dataList.nh4_n}} mg/L</span>

Načítá se…
Zrušit
Uložit