井乐禹 2 years ago
parent
commit
eac5ad7a0f
  1. 23
      src/views/dataBoard/fifteen/components/index.vue
  2. 160
      src/views/modules/visual/command/index.vue

23
src/views/dataBoard/fifteen/components/index.vue

@ -74,6 +74,7 @@ import { METERS_PER_UNIT } from 'ol/proj/Units';
import { Vector as VectorSource, XYZ } from 'ol/source'; import { Vector as VectorSource, XYZ } from 'ol/source';
import { Fill, Icon, Stroke, Style, Text } from 'ol/style'; import { Fill, Icon, Stroke, Style, Text } from 'ol/style';
import Dialog from "./dialog.vue"; import Dialog from "./dialog.vue";
export default { export default {
components: { components: {
Dialog Dialog
@ -141,28 +142,6 @@ export default {
// //
this.map.addOverlay(this.overlay); this.map.addOverlay(this.overlay);
const _this = this; const _this = this;
// let select = new Select({
// style: new Style({
// stroke: new Stroke({
// color: "rgb(0, 153, 255,1)",
// width: 2
// }),
// fill: new Fill({
// color: "rgb(209, 203, 189,0.6)"
// })
// })
// });
// //map
// _this.map.addInteraction(select);
// console.log(99999, select);
// select.on("select", function (e) {
// console.log("");
// // console.log(e.selected[0].get('name')); //Featurename
// let currentRome = e.selected[0]; //
// console.log(e)
// })
// return
_this.map.on("click", function (e) { _this.map.on("click", function (e) {
_this.featureInfo = {} _this.featureInfo = {}
let feature = _this.map.forEachFeatureAtPixel(e.pixel, function (feature) { let feature = _this.map.forEachFeatureAtPixel(e.pixel, function (feature) {

160
src/views/modules/visual/command/index.vue

@ -4,22 +4,19 @@
<div class="m-crumb"> <div class="m-crumb">
<div class="router_line"></div> <div class="router_line"></div>
<div class="div_router"> <div class="div_router">
<span <span class="router_parents"
class="router_parents"
v-for="(item, index) in runAgencyArray" v-for="(item, index) in runAgencyArray"
@click="handleClickAgency(index)" @click="handleClickAgency(index)"
:key="index" :key="index">{{ item.name }}<span class="arrow">></span></span>
>{{ item.name }}<span class="arrow">></span></span
>
<span class="router_child">{{ orgData.name }}</span> <span class="router_child">{{ orgData.name }}</span>
</div> </div>
</div> </div>
<div class="g-cnt"> <div class="g-cnt">
<div class="m-map" @click="handleClickMapBox"> <div class="m-map"
<grid-map @click="handleClickMapBox">
ref="map" <grid-map ref="map"
v-if="orgData.id" v-if="orgData.id"
@clickAgency="clickAgencyItem" @clickAgency="clickAgencyItem"
@clickDotBtn="handleClickDotBtn" @clickDotBtn="handleClickDotBtn"
@ -29,55 +26,45 @@
:dotList2="dotList2" :dotList2="dotList2"
:dotIcoList2="dotIcoList2" :dotIcoList2="dotIcoList2"
:gridCountData="gridCountData" :gridCountData="gridCountData"
:pitch="0" :pitch="0" />
/>
<div class="m-mapmenu"> <div class="m-mapmenu">
<sidemenu-left <sidemenu-left :orgId="orgId"
:orgId="orgId" @change="handleChangeMenuLeft"></sidemenu-left>
@change="handleChangeMenuLeft"
></sidemenu-left>
</div> </div>
<div class="m-search"> <div class="m-search">
<div class="input"> <div class="input">
<img class="i-search" src="@/assets/img/shuju/command/search.png" /> <img class="i-search"
<input src="@/assets/img/shuju/command/search.png" />
type="text" <input type="text"
placeholder="请输入" placeholder="请输入"
@keyup.enter="handleSearch" @keyup.enter="handleSearch"
v-model="searchName" v-model="searchName" />
/> <img v-show="searchName"
<img
v-show="searchName"
class="i-close" class="i-close"
@click="clearSearch" @click="clearSearch"
src="@/assets/img/shuju/command/close.png" src="@/assets/img/shuju/command/close.png" />
/> <div class="btn"
<div class="btn" @click="handleSearch">搜索</div> @click="handleSearch">搜索</div>
</div> </div>
<div class="result" v-if="showedSearchResult"> <div class="result"
v-if="showedSearchResult">
<template v-for="item in searchResult"> <template v-for="item in searchResult">
<div <div :key="'searchResult' + item.type"
:key="'searchResult' + item.type"
class="result-item" class="result-item"
v-show="item.list.length > 0" v-show="item.list.length > 0">
>
<div class="result-type">{{ item.title }}</div> <div class="result-type">{{ item.title }}</div>
<div <div class="result-more"
class="result-more"
@click.stop="handleClickSearchResultMore(item)" @click.stop="handleClickSearchResultMore(item)"
v-show="item.allList.length > 2" v-show="item.allList.length > 2">
>
更多 更多
</div> </div>
<div class="result-ul"> <div class="result-ul">
<div <div class="result-li z-toe"
class="result-li z-toe"
:key="item.type + 'li' + index" :key="item.type + 'li' + index"
v-for="(li, index) in item.list" v-for="(li, index) in item.list"
@click.stop="handleClickSearchLi(li, item)" @click.stop="handleClickSearchLi(li, item)">
>
<span v-if="item.type == 'position'">{{ <span v-if="item.type == 'position'">{{
li.name + " " + li.address li.name + " " + li.address
}}</span> }}</span>
@ -91,15 +78,14 @@
</div> </div>
</div> </div>
<div class="result-panel" v-show="item.showedMore"> <div class="result-panel"
v-show="item.showedMore">
<div class="result-type">{{ item.title }}</div> <div class="result-type">{{ item.title }}</div>
<div class="result-ul"> <div class="result-ul">
<div <div class="result-li z-toe"
class="result-li z-toe"
:key="item.type + 'li2_' + index" :key="item.type + 'li2_' + index"
v-for="(li, index) in item.allList" v-for="(li, index) in item.allList"
@click.stop="handleClickSearchLi(li, item)" @click.stop="handleClickSearchLi(li, item)">
>
<span v-if="item.type == 'position'">{{ <span v-if="item.type == 'position'">{{
li.name + " " + li.address li.name + " " + li.address
}}</span> }}</span>
@ -118,38 +104,37 @@
</div> </div>
</div> </div>
<div class="m-sidebar" v-show="false"> <div class="m-sidebar"
<div class="wrap" :class="[{ 'wrap-hidden': !showAgencyList }]"> v-show="false">
<div @click="hideAgencyList" class="arrow_tip"> <div class="wrap"
<img src="@/assets/img/modules/visual/popup.png" alt /> :class="[{ 'wrap-hidden': !showAgencyList }]">
<div @click="hideAgencyList"
class="arrow_tip">
<img src="@/assets/img/modules/visual/popup.png"
alt />
</div> </div>
<div class="div_agency_list"> <div class="div_agency_list">
<div class="agency_main"> <div class="agency_main">
<el-scrollbar <el-scrollbar style="height: 98%"
style="height: 98%" wrap-style="overflow-x:hidden">
wrap-style="overflow-x:hidden" <div v-if="subAgencyArray.length > 0"
> class="agency_list">
<div v-if="subAgencyArray.length > 0" class="agency_list"> <div v-for="(item, index) in subAgencyArray"
<div
v-for="(item, index) in subAgencyArray"
:key="index" :key="index"
@click="clickAgencyItem(item, index)" @click="clickAgencyItem(item, index)"
:class="[ :class="[
'agency_item', 'agency_item',
{ agency_item_on: index % 2 == 0 }, { agency_item_on: index % 2 == 0 },
]" ]">
>
<div class="agency_item_name">{{ item.name }}</div> <div class="agency_item_name">{{ item.name }}</div>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<img <img src="@/assets/img/modules/visual/noData.png"
src="@/assets/img/modules/visual/noData.png"
alt="" alt=""
srcset="" srcset=""
class="no-data-img" class="no-data-img" />
/>
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -168,11 +153,9 @@
</div> </div>
<div class="list"> <div class="list">
<sidemenu1 <sidemenu1 :orgId="orgId"
:orgId="orgId"
@change="handleChangeMenu1" @change="handleChangeMenu1"
:grandIcoList="dotIcoList" :grandIcoList="dotIcoList"></sidemenu1>
></sidemenu1>
</div> </div>
</div> </div>
@ -183,11 +166,9 @@
</div> </div>
<div class="list"> <div class="list">
<sidemenu2 <sidemenu2 :orgId="orgId"
:orgId="orgId"
@change="handleChangeMenu2" @change="handleChangeMenu2"
:grandIcoList="dotIcoList" :grandIcoList="dotIcoList"></sidemenu2>
></sidemenu2>
</div> </div>
</div> </div>
</div> </div>
@ -195,56 +176,46 @@
</div> </div>
</div> </div>
<event-info <event-info v-if="pageType === 'watch-event'"
v-if="pageType === 'watch-event'"
ref="ref_event" ref="ref_event"
:eventId="eventId" :eventId="eventId"
@handleClose="handleClose" @handleClose="handleClose" />
/>
<service-info <service-info v-if="pageType === 'create-service'"
v-if="pageType === 'create-service'"
ref="ref_service" ref="ref_service"
:default-data="serviceDefaultData" :default-data="serviceDefaultData"
@handleClose="handleClose" @handleClose="handleClose" />
/>
<demand-info <demand-info v-if="pageType === 'create-demand'"
v-if="pageType === 'create-demand'"
ref="ref_demand" ref="ref_demand"
:icResiUserId="icResiUserId" :icResiUserId="icResiUserId"
:selGridId="selGridId" :selGridId="selGridId"
@handleClose="handleClose" @handleClose="handleClose" />
/>
<qsydw <qsydw v-if="pageType === 'watch-xuncha'"
v-if="pageType === 'watch-xuncha'"
ref="ref_xuncha" ref="ref_xuncha"
:enterpriseId="enterpriseId" :enterpriseId="enterpriseId"
@handleClose="handleClose" @handleClose="handleClose" />
/>
</div> </div>
</template> </template>
<script> <script>
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; //Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import People from "@/views/modules/visual/basicinfo/people"; import People from "@/views/modules/visual/basicinfo/people";
import cptCard from "@/views/modules/visual/cpts/card";
import gridMap from "@/views/modules/visual/command/cpts/map"; import gridMap from "@/views/modules/visual/command/cpts/map";
import gridMapOl from "@/views/modules/visual/command/cpts/map-ol"; import cptCard from "@/views/modules/visual/cpts/card";
import { Loading } from "element-ui"; //Loading
import { mapGetters } from "vuex";
// import gridMapOl from "@/views/modules/visual/command/cpts/map-ol";
import sidemenuLeft from "@/views/modules/visual/command/cpts/sidemenu-left";
import sidemenu1 from "@/views/modules/visual/command/cpts/yantai-sidemenu1"; import sidemenu1 from "@/views/modules/visual/command/cpts/yantai-sidemenu1";
import sidemenu2 from "@/views/modules/visual/command/cpts/yantai-sidemenu2"; import sidemenu2 from "@/views/modules/visual/command/cpts/yantai-sidemenu2";
import sidemenuLeft from "@/views/modules/visual/command/cpts/sidemenu-left";
import ScreenLoading from "@/views/modules/visual/cpts/loading"; import ScreenLoading from "@/views/modules/visual/cpts/loading";
import eventInfo from "@/views/modules/visual/command/cpts/eventInfo";
import serviceInfo from "@/views/modules/visual/command/cpts/serviceInfo";
import demandInfo from "@/views/modules/visual/command/cpts/demandInfo"; import demandInfo from "@/views/modules/visual/command/cpts/demandInfo";
import eventInfo from "@/views/modules/visual/command/cpts/eventInfo";
import qsydw from "@/views/modules/visual/command/cpts/qsydw"; import qsydw from "@/views/modules/visual/command/cpts/qsydw";
import { mapType } from "@/utils/dai-map"; import serviceInfo from "@/views/modules/visual/command/cpts/serviceInfo";
let loading; // let loading; //
@ -288,10 +259,7 @@ export default {
People, People,
cptCard, cptCard,
ScreenLoading, ScreenLoading,
gridMap: gridMap: gridMap,
mapType == "tdzw" && SITE_CONFIG["nodeEnv"] == "dev_sdtdt"
? gridMapOl
: gridMap,
sidemenu1, sidemenu1,
sidemenu2, sidemenu2,
sidemenuLeft, sidemenuLeft,

Loading…
Cancel
Save