地图设计右键操作添加

This commit is contained in:
joylink_cuiweidong 2019-09-27 10:16:11 +08:00
parent 9d41af74bd
commit 58b429f852
3 changed files with 47 additions and 4 deletions

View File

@ -55,7 +55,7 @@
<el-card v-loading="loading" class="map-list-main" header="我的地图列表" :style="{height: (height-heightUp)+'px'}">
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" @filterSelectChange="refresh" />
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-heightUp-173) +'px' }">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-heightUp-183) +'px' }">
<el-tree
ref="tree"
:data="treeList"
@ -90,10 +90,19 @@
<el-button size="small" type="primary" class="eachButton" @click="createMap">新建地图</el-button>
<!-- {{ $t('map.newConstruction') }} -->
</div>
<map-operate-menu
ref="menu"
:point="point"
:edit-model="editModel"
:skin-code="skinCode"
@refresh="refresh1"
@jlmap3d="jlmap3d"
/>
</el-card>
</div>
</template>
<script>
import { DeviceMenu } from '@/scripts/ConstDic';
import { postBuildMapImport } from '@/api/jmap/mapdraft';
import { getPublishMapTree } from '@/api/management/mapprd';
import { UrlConfig } from '@/router/index';
@ -101,12 +110,14 @@
import FilterCity from '@/views/components/filterCity';
import drapUp from '@/views/components/drapUp/index';
import localStore from 'storejs';
import MapOperateMenu from '@/views/map/mapdraft/mapmanage/operateMenu';
export default {
name: 'ExamDetailList',
components: {
FilterCity,
drapUp,
MapOperateMenu
},
props: {
height: {
@ -135,6 +146,12 @@
},
mapId: '',
heightUp: 450,
point: {
x: 0,
y: 0
},
editModel: {},
skinCode:''
};
},
computed: {
@ -190,6 +207,8 @@
this.$router.push({ path: `${UrlConfig.design.runPlan}/${this.mapId}` })
}
}
//
// ..........
},
async refresh(filterSelect) {
this.loading = true;
@ -240,6 +259,29 @@
this.$messageBox(this.$t('error.refreshFailed'));
}
},
refresh1(){
},
showContextMenu(e, obj, node, vueElem) {
if (obj && obj.type == 'mapDesign') {
e.preventDefault();
const menu = DeviceMenu.Map;
this.point = {
x: e.clientX,
y: e.clientY
};
this.editModel = obj;
this.editModel.skinCode = node.parent.data.id;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
else{
//
}
},
jlmap3d() {
this.$router.push({ path: '/jlmap3d/edit', query: { mapid: this.editModel.id } });
},
drapHeight(height) {
this.heightUp = Number(height);
},

View File

@ -109,7 +109,6 @@
this.$router.push({ path: `${UrlConfig.map.draft}/${this.editModel.id}/${data.view}`, query: { name: this.editModel.name } });
}
},
resize() {
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
const width = this.$store.state.app.width - 521 - this.widthLeft;

View File

@ -113,7 +113,9 @@ export default {
@import "src/styles/mixin.scss";
.blockContext {
float: left;
// float: left;
height: 100%;
overflow: hidden;
}
.mapContext {
@ -122,7 +124,7 @@ export default {
.stepContext {
float: right;
width: 480px;
width: 520px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
}
</style>