123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- <template>
- <div class="widget-pipesectionui">
- <el-button-group>
- <el-button @click="showLayerList">图层控制</el-button>
- <el-button @click="showPbsTree">工程列表</el-button>
- <el-button @click="showDisplayControlList">显示控制</el-button>
- <el-dropdown @command="handleCommand">
- <el-button class="unit_handle">
- 部件查看<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item command="point">点选</el-dropdown-item>
- <el-dropdown-item command="rect">框选</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <el-dropdown @command="handleMenu">
- <el-button class="pipeInteraction">
- 管网交互<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- v-for="item in compMenu"
- :key="item.id"
- :command="item"
- >{{ item.name }}</el-dropdown-item
- >
- </el-dropdown-menu>
- </el-dropdown>
- <el-dropdown @command="handleMenu">
- <el-button>
- 管网分析<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- v-for="item in analysisMenu"
- :key="item.id"
- :command="item"
- >{{ item.name }}</el-dropdown-item
- >
- </el-dropdown-menu>
- </el-dropdown>
- </el-button-group>
-
- </div>
- </template>
- <script>
- import Vue from "vue";
- import { InfoWindow } from "@/utils/mapCommon/tools";
- export default {
- name: "TopSectionUI",
- components:{
-
-
- },
- props: {
- isInit: false,
- },
- data() {
- return {
- compMenu: [
- {
- name: "部件二维码",
- id: "PartQRCodeManagement",
- widgetid: "Panel",
- },
- {
- name: "部件资料上传",
- id: "UnitDataUpload",
- widgetid: "Panel",
- },
- {
- name: "管底标高标注",
- id: "ElevationMark",
- widgetid: "Panel",
- },
- {
- name: "管径标注",
- id: "DiameterMark",
- widgetid: "Panel",
- },
- {
- name: "坐标标注",
- id: "CoordinateMark",
- widgetid: "Panel",
- },
- {
- name: "栓点标注",
- id: "BoltPointMark",
- widgetid: "Panel",
- },
- {
- name: "扯旗标注",
- id: "FlagMark",
- widgetid: "Panel",
- },
- {
- name: "地标标注",
- id: "LandMarkMarking",
- widgetid: "Panel",
- },
- {
- name: "标注管理",
- id: "ManageMarking",
- widgetid: "Panel",
- },
- ],
- analysisMenu:[
- {
- name: "管道开挖综合分析",
- id: "PipeCrossMergeAnalysis",
- widgetid: "HalfPanel",
- },
- {
- name: "排水专项检查",
- id: "DrainSpecialCheck",
- widgetid: "Panel",
- },
- {
- name: "开挖分析",
- id: "ExcavationAnalysis",
- widgetid: "Panel",
- },
- {
- name: "碰撞分析",
- id: "ImpactAnalysis",
- widgetid: "Panel",
- },
- {
- name: "纵剖面分析",
- id: "PipeVerticalSectionAnalysis",
- widgetid: "Panel",
- },
- {
- name: "横剖面分析",
- id: "PipeCrossSectionAnalysis",
- widgetid: "Panel",
- },
- {
- name: "范围分析",
- id: "BufferAnalysis",
- widgetid: "Panel",
- },
- {
- name: "上/下游追踪分析",
- id: "ConnectedAnalysis",
- widgetid: "Panel",
- },
- ],
- };
- },
- watch: {
- isInit() {
- this.viewer = window.viewer;
- },
- },
- methods: {
- showPbsTree() {
- const menu = {
- label: "PBS工程结构树",
- widgetid: "Panel",
- id: "PbsTreeManagement",
- };
- this.$store.dispatch("map/changeMethod", menu);
- if (this.$store.state.map.fullPanels.length > 0) {
- this.$store.dispatch("map/delAllFull");
- }
- },
- handleMenu(info) {
- switch (info.name) {
- case "管底标高标注":
- const elevationMark = new ElevationMark();
- elevationMark.initMarkEvents(this.viewer);
- break;
- case "管径标注":
- const diameterMark = new DiameterMark();
- diameterMark.initMarkEvents(this.viewer);
- break;
- case "坐标标注":
- const coordinateMark = new CoordinateMark();
- coordinateMark.initMarkEvents(this.viewer);
- break;
- case "栓点标注":
- const boltPointMark = new BoltPointMark();
- boltPointMark.initMarkEvents(this.viewer);
- break;
- case "扯旗标注":
- const flagMark = new FlagMark();
- flagMark.initMarkEvents(this.viewer);
- break;
- case "纵剖面分析":
- this.initAnalysis("纵剖面分析")
- break;
- case "横剖面分析":
- this.initAnalysis("横剖面分析")
- break;
- default:
- const menu = {
- label: info.name,
- widgetid: info.widgetid,
- id: info.id,
- };
- this.$store.dispatch("map/changeMethod", menu);
- if (
- info.widgetid !== "FullPanel" &&
- this.$store.state.map.fullPanels.length > 0
- ) {
- this.$store.dispatch("map/delAllFull");
- }
- }
- },
- handleCommand(command) {
- if (command === "point") {
- this.pointClick();
- } else {
- this.rectClick();
- }
- },
-
- initAnalysis(name) {
- if(name=='纵剖面分析'){
- this.$refs.vsAnalysis.initMarkEvents()
- }
- if(name=='横剖面分析'){
- this.$refs.csAnalysis.initPipeLayers()
- }
- },
-
- pointClick() {
- const pipeInfoConstructor = Vue.extend(PipeUnitInfo);
- const pipeInfo = new pipeInfoConstructor({
- data: {
- pickType: "point",
- isInteractive: true,
- locateUnit: null,
- },
- store: this.$store,
- }).$mount();
- },
-
- rectClick() {
- const pipeInfoConstructor = Vue.extend(PipeUnitInfo);
- const pipeInfo = new pipeInfoConstructor({
- data: {
- pickType: "rect",
- isInteractive: true,
- locateUnit: null,
- },
- store: this.$store,
- }).$mount();
- },
-
- showLayerList(){
- const menu = {
- label: "图层控制",
- widgetid: "Panel",
- id: "LayerList",
- };
- this.$store.dispatch("map/changeMethod", menu);
- if (this.$store.state.map.fullPanels.length > 0) {
- this.$store.dispatch("map/delAllFull");
- }
- },
-
- showDisplayControlList(){
- const menu = {
- label: "显示控制",
- widgetid: "Panel",
- id: "DisplayControlList",
- };
- this.$store.dispatch("map/changeMethod", menu);
- if (this.$store.state.map.fullPanels.length > 0) {
- this.$store.dispatch("map/delAllFull");
- }
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .widget-pipesectionui {
- position: absolute;
- z-index: 990;
- top: 13px;
- right: 17px;
- display: flex;
- flex-flow: row nowrap;
- border-radius: 4px;
- box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.4);
- .el-button {
- border-width: 0px;
- @media screen and (max-width:1700px) {
- padding:12px 10px;
- }
- }
- /deep/ .el-dropdown{
- margin: 0 -10px;
- }
- .el-button-group > .el-button:not(:last-child)::after {
- content: " ";
- width: 1px;
- height: 50%;
- background-color: #dedede;
- position: absolute;
- right: 0;
- top: 10px;
- z-index: 2;
- }
- .pipeInteraction{
- border-radius: 0;
- }
- .pipeInteraction::after{
- content: " ";
- width: 1px;
- height: 50%;
- background-color: #dedede;
- position: absolute;
- right: 0;
- top: 10px;
- z-index: 2;
- }
- .unit_handle {
- border-radius: 0;
- padding-right: 15px;
- ::after {
- content: " ";
- width: 1px;
- height: 50%;
- background-color: #dedede;
- position: absolute;
- right: 0;
- top: 10px;
- z-index: 2;
- }
- }
- .el-button:focus {
- color: #606266;
- background-color: #fff;
- }
- .el-button:hover {
- background-color: #fff;
- }
- }
- </style>
|