月球大数据地理空间分析展示平台-【前端】-月球2期前端
surprise
2023-10-23 538d7313f98da3c304365f1c2b22c3e23d91db35
src/views/plotting/attributeInfo.vue
@@ -22,15 +22,18 @@
      </div>
      <div class="contentBox" v-show="showEntity.label">
        <div class="contentLabel"> <label>内容</label></div>
        <div class="contentmenu"><el-input size="mini" v-model="fromLine.text"></el-input></div>
        <div class="contentmenu"><el-input size="mini" @change="setEntityTextChange" v-model="fromLine.text"></el-input>
        </div>
      </div>
      <div class="contentBox" v-show="showEntity.label">
        <div class="contentLabel"> <label>字体</label></div>
        <div class="contentmenu"><el-input size="mini" v-model="fromLine.font"></el-input></div>
        <div class="contentmenu"><el-input size="mini" @change="setEntityFontChange" v-model="fromLine.font"></el-input>
        </div>
      </div>
      <div class="contentBox" v-show="showEntity.label">
        <div class="contentLabel"> <label>比例大小</label></div>
        <div class="contentmenu"><el-input size="mini" v-model="fromLine.scale"></el-input></div>
        <div class="contentmenu"><el-input size="mini" @change="setEntityScaleChange" v-model="fromLine.scale"></el-input>
        </div>
      </div>
      <div class="contentBox" v-show="showEntity.point">
        <div class="contentLabel"> <label>大小</label></div>
@@ -55,7 +58,7 @@
        <div class="contentmenu"> <el-slider size="small" v-model="fromLine.materialAlpha"
            @change="setEntityMaterColorChange" :step="0.1" :max="1" :min="0" /></div>
      </div>
      <div class="contentBox">
      <div class="contentBox" v-show="showEntity.setframeToGround">
        <div class="contentLabel"> <label>是否显示边框</label></div>
        <div class="contentmenu"> <el-switch @change="setEntityOutLineShowReferenceChange" v-model="fromLine.outline" />
        </div>
@@ -138,6 +141,7 @@
  point: false,
  clampToGround: false,
  setclampToGround: true,
  setframeToGround:true,
});
const entity = ref(null);
const entityType = ref(null);
@@ -145,6 +149,16 @@
  entity.value.name = fromLine.value.cnName;
  store.state.editTemporarName = fromLine.value.cnName;
};
const setEntityTextChange = () => {
  entity.value.label.text._value = fromLine.value.text
}
const setEntityFontChange = () => {
  entity.value.label.font._value = fromLine.value.font;
}
const setEntityScaleChange = () => {
  entity.value.label.scale._value = fromLine.value.scale;
}
const setEntitySizeChange = () => {
  entity.value.point._pixelSize._value = parseInt(fromLine.value.size);
};
@@ -156,12 +170,11 @@
      break;
    case "label":
      entity.value.label.disableDepthTestDistance =
        fromLine.value.heightReference == true ? null : false;
        fromLine.value.heightReference == true ? null : Number.POSITIVE_INFINITY;
      break;
    case "polyline":
      entity.value.polyline.clampToGround = fromLine.value.heightReference;
      break;
  }
};
const setEntityOutLineWidthReferenceChange = () => {
@@ -202,9 +215,11 @@
  } else if (type == 'polyline') {
    if (fromLine.value.outline) {
      entity.value.polyline.material.outlineWidth._value = fromLine.value.width;
    } else {
      entity.value.polyline.material.outlineWidth._value = null;
    }
    entity.value.outline = fromLine.value.outline
  } else if (type == 'rectangle') {
    entity.value.rectangle.outline._value = fromLine.value.outline;
@@ -217,7 +232,9 @@
  store.state.editTemporaryback = entity._value.id;
  store.state.setEditTemporaryShow = false;
  store.state.editTemporaryId = null;
  sgworld.Creator.SimpleGraphic.SimpleGraphicObj=[];
  sgworld.Creator.SimpleGraphic.edit(false, { editProp: false });
  sgworld.Creator.SimpleGraphic.SimpleGraphicObj = [];
};
const setEntityMaterColorChange = () => {
@@ -335,7 +352,6 @@
  var res = entity.value;
  var type = res.GeoType;
  entityType.value = type;
  debugger
  switch (type) {
    case "label":
      showEntity.value.label = true;
@@ -348,9 +364,12 @@
      break;
    case "rectangle":
      showEntity.value.setclampToGround = false;
      showEntity.value.setframeToGround = false;
      break;
    case "polygon":
      showEntity.value.setclampToGround = false;
      showEntity.value.setframeToGround = false;
      break;
  }