| | |
| | | <template> |
| | | <div |
| | | v-drag |
| | | class="plottingBox" |
| | | > |
| | | <div v-drag class="plottingBox"> |
| | | <div class="plottingTitle"> |
| | | <div class="tileLeft"> |
| | | <div |
| | | class="titleImg" |
| | | @click="setCloseplotting" |
| | | > |
| | | <div class="titleImg" @click="setCloseplotting"> |
| | | <ArrowLeft /> |
| | | </div> |
| | | <div class="titleLable">标绘查询</div> |
| | |
| | | <div class="plotting_content_btn"> |
| | | <span class="plotting_content_title">标绘工具</span> |
| | | <div class="plotting_btn"> |
| | | <div |
| | | class="btn_box_d btn_box" |
| | | @click="setMenuDraw('point')" |
| | | ></div> |
| | | <div |
| | | class="btn_box_x btn_box" |
| | | @click="setMenuDraw('polyline')" |
| | | ></div> |
| | | <div |
| | | class="btn_box_m btn_box" |
| | | @click="setMenuDraw('polygon')" |
| | | ></div> |
| | | <div class="btn_box_d btn_box" @click="setMenuDraw('point')"></div> |
| | | <div class="btn_box_x btn_box" @click="setMenuDraw('polyline')"></div> |
| | | <div class="btn_box_m btn_box" @click="setMenuDraw('polygon')"></div> |
| | | </div> |
| | | </div> |
| | | <div class="plotting_list"> |
| | |
| | | class="plotting_list_tr" |
| | | v-for="(item, i) in list" |
| | | :key="i" |
| | | @click.stop="resultShow(item)" |
| | | > |
| | | <div class="plotting_list_tr_name"> |
| | | <img |
| | |
| | | /><span>{{ item.name }}</span> |
| | | </div> |
| | | <div class="plotting_list_tr_btn"> |
| | | <div |
| | | class="tr_btn dw" |
| | | @click="setLayerLocation(item)" |
| | | ></div> |
| | | <div |
| | | class="tr_btn sc" |
| | | @click="setLayerRemove(item)" |
| | | ></div> |
| | | <div class="tr_btn dw" @click.stop="setLayerLocation(item)"></div> |
| | | <div class="tr_btn sc" @click.stop="setLayerRemove(item)"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | reactive, |
| | | defineProps, |
| | | defineEmits, |
| | | watch, |
| | | } from "vue"; |
| | | import { useStore } from "vuex"; // 引入useStore 方法 |
| | | const emits = defineEmits(["setCloseplotting"]); |
| | | const store = useStore(); // 该方法用于返回store 实例 |
| | | let list = ref([]); |
| | | const drawFlag = ref(null); |
| | | const plotNum = ref({ |
| | |
| | | if (entities[i].name == res.name) { |
| | | Viewer.entities.remove(entities[i]); |
| | | list.value.splice(i, 1); |
| | | let obj = { |
| | | isshow: false, |
| | | entitiesData: {}, |
| | | getData: {}, |
| | | }; |
| | | store.state.plottingInquireData = obj; |
| | | break; |
| | | } |
| | | } |
| | |
| | | const setCloseplotting = () => { |
| | | emits("setCloseplotting", false); |
| | | }; |
| | | const resultShow = (res) => { |
| | | console.log(res); |
| | | let obj = { |
| | | isshow: true, |
| | | entitiesData: res, |
| | | getData: {}, |
| | | }; |
| | | // store.commit("SET_plotting", obj); |
| | | store.state.plottingInquireData = obj; |
| | | }; |
| | | watch( |
| | | () => store.state.plottingInquireData, |
| | | (nVal, oVal) => { |
| | | if (nVal.isshow == false) { |
| | | //列表删除联动 |
| | | if (nVal.entitiesData != {} && nVal.entitiesData.name) { |
| | | for (var i in list.value) { |
| | | if (list.value[i].name == nVal.entitiesData.name) { |
| | | console.log(list.value[i].name); |
| | | list.value.splice(i, 1); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { deep: true } |
| | | ); |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 25px; |
| | | cursor: pointer; |
| | | .plotting_list_tr_name { |
| | | display: flex; |
| | | align-items: center; |