diff --git a/src/assets/img/shuju/command/ico2/IS_DB.png b/src/assets/img/shuju/command/ico2/IS_DB.png new file mode 100644 index 000000000..4fc475b2c Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_DB.png differ diff --git a/src/assets/img/shuju/command/ico2/IS_DBH.png b/src/assets/img/shuju/command/ico2/IS_DBH.png new file mode 100644 index 000000000..337a37735 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_DBH.png differ diff --git a/src/assets/img/shuju/command/ico2/IS_KC.png b/src/assets/img/shuju/command/ico2/IS_KC.png new file mode 100644 index 000000000..2bba7ab46 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_KC.png differ diff --git a/src/assets/img/shuju/command/ico2/IS_MB.png b/src/assets/img/shuju/command/ico2/IS_MB.png new file mode 100644 index 000000000..9e61bc50e Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_MB.png differ diff --git a/src/assets/img/shuju/command/ico2/IS_OLD_PEOPLE.png b/src/assets/img/shuju/command/ico2/IS_OLD_PEOPLE.png new file mode 100644 index 000000000..28745908a Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_OLD_PEOPLE.png differ diff --git a/src/assets/img/shuju/command/ico2/IS_UNEMPLOYED.png b/src/assets/img/shuju/command/ico2/IS_UNEMPLOYED.png new file mode 100644 index 000000000..353440c5c Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_UNEMPLOYED.png differ diff --git a/src/assets/img/shuju/command/ico2/IS_YLFN.png b/src/assets/img/shuju/command/ico2/IS_YLFN.png new file mode 100644 index 000000000..353440c5c Binary files /dev/null and b/src/assets/img/shuju/command/ico2/IS_YLFN.png differ diff --git a/src/assets/img/shuju/command/ico2/anzhibangjiao.png b/src/assets/img/shuju/command/ico2/anzhibangjiao.png new file mode 100644 index 000000000..077e3a75c Binary files /dev/null and b/src/assets/img/shuju/command/ico2/anzhibangjiao.png differ diff --git a/src/assets/img/shuju/command/ico2/buliangqingshaonian.png b/src/assets/img/shuju/command/ico2/buliangqingshaonian.png new file mode 100644 index 000000000..5a77abd57 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/buliangqingshaonian.png differ diff --git a/src/assets/img/shuju/command/ico2/enterprise_patrol_unqualified.png b/src/assets/img/shuju/command/ico2/enterprise_patrol_unqualified.png new file mode 100644 index 000000000..222b77a14 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/enterprise_patrol_unqualified.png differ diff --git a/src/assets/img/shuju/command/ico2/event_tdnd.png b/src/assets/img/shuju/command/ico2/event_tdnd.png new file mode 100644 index 000000000..582a78149 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/event_tdnd.png differ diff --git a/src/assets/img/shuju/command/ico2/resi.png b/src/assets/img/shuju/command/ico2/resi.png new file mode 100644 index 000000000..1c5bb3099 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/resi.png differ diff --git a/src/assets/img/shuju/command/ico2/resi_xfry.png b/src/assets/img/shuju/command/ico2/resi_xfry.png new file mode 100644 index 000000000..484d4fa78 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/resi_xfry.png differ diff --git a/src/assets/img/shuju/command/ico2/shequjiaozheng.png b/src/assets/img/shuju/command/ico2/shequjiaozheng.png new file mode 100644 index 000000000..79d3ed2a7 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/shequjiaozheng.png differ diff --git a/src/assets/img/shuju/command/ico2/xidurenyuan.png b/src/assets/img/shuju/command/ico2/xidurenyuan.png new file mode 100644 index 000000000..25a3fc3df Binary files /dev/null and b/src/assets/img/shuju/command/ico2/xidurenyuan.png differ diff --git a/src/assets/img/shuju/command/ico2/xiejiaorenyuan.png b/src/assets/img/shuju/command/ico2/xiejiaorenyuan.png new file mode 100644 index 000000000..31ce7ad11 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/xiejiaorenyuan.png differ diff --git a/src/assets/img/shuju/command/ico2/zhaoshizhaohuojingshenbing.png b/src/assets/img/shuju/command/ico2/zhaoshizhaohuojingshenbing.png new file mode 100644 index 000000000..6099d0332 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/zhaoshizhaohuojingshenbing.png differ diff --git a/src/assets/img/shuju/command/ico2/zhzl_rq.png b/src/assets/img/shuju/command/ico2/zhzl_rq.png new file mode 100644 index 000000000..b1d1edb68 Binary files /dev/null and b/src/assets/img/shuju/command/ico2/zhzl_rq.png differ diff --git a/src/assets/img/shuju/command/ico3/IS_DB.png b/src/assets/img/shuju/command/ico3/IS_DB.png new file mode 100644 index 000000000..134e2daf5 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/IS_DB.png differ diff --git a/src/assets/img/shuju/command/ico3/IS_DBH.png b/src/assets/img/shuju/command/ico3/IS_DBH.png new file mode 100644 index 000000000..18236e75a Binary files /dev/null and b/src/assets/img/shuju/command/ico3/IS_DBH.png differ diff --git a/src/assets/img/shuju/command/ico3/IS_KC.png b/src/assets/img/shuju/command/ico3/IS_KC.png new file mode 100644 index 000000000..48bd3208c Binary files /dev/null and b/src/assets/img/shuju/command/ico3/IS_KC.png differ diff --git a/src/assets/img/shuju/command/ico3/IS_MB.png b/src/assets/img/shuju/command/ico3/IS_MB.png new file mode 100644 index 000000000..a7a87afa4 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/IS_MB.png differ diff --git a/src/assets/img/shuju/command/ico3/IS_OLD_PEOPLE.png b/src/assets/img/shuju/command/ico3/IS_OLD_PEOPLE.png new file mode 100644 index 000000000..8aee93ce3 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/IS_OLD_PEOPLE.png differ diff --git a/src/assets/img/shuju/command/ico3/IS_UNEMPLOYED.png b/src/assets/img/shuju/command/ico3/IS_UNEMPLOYED.png new file mode 100644 index 000000000..3e4d62f2c Binary files /dev/null and b/src/assets/img/shuju/command/ico3/IS_UNEMPLOYED.png differ diff --git a/src/assets/img/shuju/command/ico3/anzhibangjiao.png b/src/assets/img/shuju/command/ico3/anzhibangjiao.png new file mode 100644 index 000000000..f95e5fbe1 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/anzhibangjiao.png differ diff --git a/src/assets/img/shuju/command/ico3/buliangqingshaonian.png b/src/assets/img/shuju/command/ico3/buliangqingshaonian.png new file mode 100644 index 000000000..1fbccbaf1 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/buliangqingshaonian.png differ diff --git a/src/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png b/src/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png new file mode 100644 index 000000000..0edae4416 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png differ diff --git a/src/assets/img/shuju/command/ico3/event_tdnd.png b/src/assets/img/shuju/command/ico3/event_tdnd.png new file mode 100644 index 000000000..8d10d18c3 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/event_tdnd.png differ diff --git a/src/assets/img/shuju/command/ico3/resi_xfry.png b/src/assets/img/shuju/command/ico3/resi_xfry.png new file mode 100644 index 000000000..9dc9cded7 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/resi_xfry.png differ diff --git a/src/assets/img/shuju/command/ico3/shequjiaozheng.png b/src/assets/img/shuju/command/ico3/shequjiaozheng.png new file mode 100644 index 000000000..7b4af580b Binary files /dev/null and b/src/assets/img/shuju/command/ico3/shequjiaozheng.png differ diff --git a/src/assets/img/shuju/command/ico3/xidurenyuan.png b/src/assets/img/shuju/command/ico3/xidurenyuan.png new file mode 100644 index 000000000..6e9addcde Binary files /dev/null and b/src/assets/img/shuju/command/ico3/xidurenyuan.png differ diff --git a/src/assets/img/shuju/command/ico3/xiejiaorenyuan.png b/src/assets/img/shuju/command/ico3/xiejiaorenyuan.png new file mode 100644 index 000000000..f2a720395 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/xiejiaorenyuan.png differ diff --git a/src/assets/img/shuju/command/ico3/zhaoshizhaohuojingshenbing.png b/src/assets/img/shuju/command/ico3/zhaoshizhaohuojingshenbing.png new file mode 100644 index 000000000..e4e802c63 Binary files /dev/null and b/src/assets/img/shuju/command/ico3/zhaoshizhaohuojingshenbing.png differ diff --git a/src/assets/img/shuju/command/search.png b/src/assets/img/shuju/command/search.png new file mode 100644 index 000000000..e59cb1592 Binary files /dev/null and b/src/assets/img/shuju/command/search.png differ diff --git a/src/assets/scss/modules/visual/command.scss b/src/assets/scss/modules/visual/command.scss index 6503ec184..0df662873 100644 --- a/src/assets/scss/modules/visual/command.scss +++ b/src/assets/scss/modules/visual/command.scss @@ -54,6 +54,133 @@ position: relative; } +.m-mapmenu { + position: absolute; + z-index: 100; + left: 20px; + top: 20px; +} + +.m-search { + position: absolute; + z-index: 200; + left: 0; + right: 0; + top: 30px; + width: 630px; + margin: 0 auto; + + .input { + width: 100%; + background-color: #fff; + border-radius: 8px; + display: flex; + align-items: center; + overflow: hidden; + border: 1px solid #5aafff; + box-shadow: 0px 4px 8px 0px rgba(147, 147, 147, 0.26); + + > input { + width: 420px; + border: none; + line-height: 45px; + font-size: 18px; + font-family: PingFang SC; + font-weight: 400; + color: #333333; + } + + > img { + margin: 0 16px; + width: 30px; + height: 30px; + } + + .btn { + margin-left: auto; + width: 120px; + height: 53px; + line-height: 53px; + background: #0082fb; + border-radius: 0px 8px 8px 0px; + color: #fff; + text-align: center; + font-size: 22px; + font-family: PingFang SC; + font-weight: 500; + color: #ffffff; + cursor: pointer; + } + } + + .result { + position: relative; + box-sizing: border-box; + padding: 0 15px; + width: 509px; + background: rgba(#020340, 0.58); + border-radius: 8px; + .result-item { + position: relative; + padding: 12px 0; + border-bottom: 1px solid rgba(#fff, 0.2); + + .result-panel { + position: absolute; + box-sizing: border-box; + padding: 15px; + left: 509px - 10px; + top: 0; + width: 500px; + background: rgba(#020340, 0.58); + border-radius: 8px; + } + + .result-type { + margin-bottom: 10px; + font-size: 20px; + line-height: 30px; + font-family: PingFang SC; + font-weight: bold; + color: #00f0ff; + } + + .result-more { + position: absolute; + right: 0; + top: 20px; + width: 50px; + height: 22px; + text-align: center; + line-height: 22px; + background: #dd8d02; + border-radius: 2px; + font-size: 14px; + font-family: PingFang SC; + font-weight: 400; + color: #ffffff; + cursor: pointer; + } + + .result-li { + line-height: 28px; + font-size: 16px; + font-family: PingFang SC; + font-weight: 400; + color: #ffffff; + cursor: pointer; + @include toe; + i { + margin-right: 5px; + } + span { + width: 100%; + } + } + } + } +} + .m-sidemenu { margin-left: 20px; width: 360px; @@ -79,7 +206,7 @@ } .list { - min-height: 800px; + min-height: 780px; } } diff --git a/src/assets/scss/shuju-card.scss b/src/assets/scss/shuju-card.scss index 595575e6a..548f0bfbd 100644 --- a/src/assets/scss/shuju-card.scss +++ b/src/assets/scss/shuju-card.scss @@ -8,7 +8,7 @@ min-width: 200px; width: 100%; height: 100%; - padding: 22px 16px 22px 22px; + padding: 22px 22px 22px 22px; .card-wrap { height: 100%; @@ -82,6 +82,7 @@ background-repeat: repeat; overflow-y: auto; height: 100%; + margin-right: -8px; @include scrollBar; } } diff --git a/src/views/modules/visual/basicinfo/basicInfoMain.vue b/src/views/modules/visual/basicinfo/basicInfoMain.vue index 3a0e2ccee..b0275579a 100644 --- a/src/views/modules/visual/basicinfo/basicInfoMain.vue +++ b/src/views/modules/visual/basicinfo/basicInfoMain.vue @@ -135,7 +135,7 @@ import BasicInfoCommunity from "./basicInfoCommunity"; import People from "./people"; import cptCard from "@/views/modules/visual/cpts/card"; -import gridMap from "@/views/modules/visual/basicinfo/cpts/grid-map"; +import gridMap from "@/views/modules/visual/cpts/map/index"; import ScreenLoading from "@/views/modules/visual/cpts/loading"; let loading; //加载动画 diff --git a/src/views/modules/visual/basicinfo/cpts/grid-map.vue b/src/views/modules/visual/basicinfo/cpts/grid-map.vue deleted file mode 100644 index 01b186eb3..000000000 --- a/src/views/modules/visual/basicinfo/cpts/grid-map.vue +++ /dev/null @@ -1,423 +0,0 @@ - - - - - diff --git a/src/views/modules/visual/command/cpts/sidemenu-left.vue b/src/views/modules/visual/command/cpts/sidemenu-left.vue new file mode 100644 index 000000000..2c9e9479c --- /dev/null +++ b/src/views/modules/visual/command/cpts/sidemenu-left.vue @@ -0,0 +1,248 @@ + + + + + diff --git a/src/views/modules/visual/command/cpts/sidemenu.vue b/src/views/modules/visual/command/cpts/sidemenu.vue index 973d07e46..574c9047c 100644 --- a/src/views/modules/visual/command/cpts/sidemenu.vue +++ b/src/views/modules/visual/command/cpts/sidemenu.vue @@ -6,23 +6,36 @@ :key="'menu1' + item.coverageType" v-for="item in menuList" > -
+
{{ item.coverageName }} - ({{ item.count }}) + ({{ item.quantity }})
-
+
-
+
{{ granditem.categoryName }} - ({{ granditem.count }}) + ({{ granditem.quantity }})
-
+
{{ subitem.placeTypeName }} - ({{ subitem.count }}) + ({{ subitem.quantity }})
-
+
-
+
{{ granditem.categoryName }} - ({{ granditem.count }}) + ({{ granditem.quantity }})
@@ -120,15 +147,14 @@ export default { name: "sidemenu", props: { - isFullScreen: { - type: Boolean, - default: false, - }, - grandIcoList: { type: Object, default: () => ({}), }, + orgId: { + type: String, + default: "", + }, }, data() { @@ -138,21 +164,66 @@ export default { }, computed: {}, + watch: { + menuList: { + handler(newValue, oldValue) { + // console.log("菜单改变拉------------------------------------", newValue); + if (oldValue.length != 0) { + this.$emit("change", newValue); + } + }, + deep: true, + // immediate: true + }, + orgId() { + this.requestList(); + }, + }, mounted() { this.requestList(); }, methods: { + selectAll(item) { + item.selected = !item.selected; + item.categories.forEach((subitem) => { + subitem.selected = item.selected; + }); + if (item.placeTypesInAnalysis) { + item.placeTypesInAnalysis.forEach((subitem) => { + subitem.selected = item.selected; + subitem.categories.forEach((subitem2) => { + subitem2.selected = item.selected; + }); + }); + } + }, //加载组织数据 async requestList() { const url = "/data/aggregator/coverage/analysis/resourceCategories"; - let params = {}; + let params = { + agencyId: this.orgId, + }; const { data, code, msg } = await requestPost(url, params); if (code === 0) { - this.menuList = data; + this.menuList = data.map((item) => { + item.selected = false; + item.folded = true; + item.categories.forEach((subitem) => { + subitem.selected = false; + }); + item.placeTypesInAnalysis.forEach((subitem) => { + subitem.selected = false; + subitem.folded = true; + subitem.categories.forEach((granditem) => { + granditem.selected = false; + }); + }); + return item; + }); } else { this.$message.error(msg); } diff --git a/src/views/modules/visual/command/index.vue b/src/views/modules/visual/command/index.vue index a50b5f204..8aec369c8 100644 --- a/src/views/modules/visual/command/index.vue +++ b/src/views/modules/visual/command/index.vue @@ -19,15 +19,101 @@
-
+
-
+
+ +
+ + + +
@@ -75,7 +161,11 @@
- +
@@ -90,16 +180,57 @@ import { Loading } from "element-ui"; //引入Loading服务 import { requestPost } from "@/js/dai/request"; import People from "@/views/modules/visual/basicinfo/people"; import cptCard from "@/views/modules/visual/cpts/card"; -import gridMap from "@/views/modules/visual/basicinfo/cpts/grid-map"; +import gridMap from "@/views/modules/visual/cpts/map/command"; import sidemenu from "@/views/modules/visual/command/cpts/sidemenu"; +import sidemenuLeft from "@/views/modules/visual/command/cpts/sidemenu-left"; import ScreenLoading from "@/views/modules/visual/cpts/loading"; let loading; //加载动画 +function iniSearchResult() { + return [ + { + type: "position", + title: "地点", + showedMore: false, + list: [], + allList: [], + }, + { + type: "resi", + title: "居民", + showedMore: false, + list: [], + allList: [], + }, + { + type: "event", + title: "事件", + showedMore: false, + list: [], + allList: [], + }, + { + type: "resource", + title: "资源", + showedMore: false, + list: [], + allList: [], + }, + ]; +} + export default { name: "HomeMap", - components: { People, cptCard, ScreenLoading, gridMap, sidemenu }, + components: { + People, + cptCard, + ScreenLoading, + gridMap, + sidemenu, + sidemenuLeft, + }, props: {}, @@ -124,6 +255,7 @@ export default { dotList: [], categoryKeys: [], + coverageTypes: [], dotIcoList: { anzhibangjiao: require("@/assets/img/shuju/command/ico/anzhibangjiao.png"), @@ -206,6 +338,33 @@ export default { pu_6: require("@/assets/img/shuju/command/ico/pu_6.png"), pu_7: require("@/assets/img/shuju/command/ico/pu_7.png"), }, + + gridCountData: [], + dotList2: [], + categoryKeys2: [], + coverageTypes2: [], + dotIcoList2: { + event_tdnd: require("@/assets/img/shuju/command/ico3/event_tdnd.png"), + enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png"), + resi_xfry: require("@/assets/img/shuju/command/ico3/resi_xfry.png"), + xiejiaorenyuan: require("@/assets/img/shuju/command/ico3/xiejiaorenyuan.png"), + zhaoshizhaohuojingshenbing: require("@/assets/img/shuju/command/ico3/zhaoshizhaohuojingshenbing.png"), + buliangqingshaonian: require("@/assets/img/shuju/command/ico3/buliangqingshaonian.png"), + shequjiaozheng: require("@/assets/img/shuju/command/ico3/shequjiaozheng.png"), + xidurenyuan: require("@/assets/img/shuju/command/ico3/xidurenyuan.png"), + IS_DBH: require("@/assets/img/shuju/command/ico3/IS_DBH.png"), + // IS_YLFN: require("@/assets/img/shuju/command/ico3/IS_YLFN.png"), + IS_OLD_PEOPLE: require("@/assets/img/shuju/command/ico3/IS_OLD_PEOPLE.png"), + IS_UNEMPLOYED: require("@/assets/img/shuju/command/ico3/IS_UNEMPLOYED.png"), + IS_DB: require("@/assets/img/shuju/command/ico3/IS_DB.png"), + IS_MB: require("@/assets/img/shuju/command/ico3/IS_MB.png"), + anzhibangjiao: require("@/assets/img/shuju/command/ico3/anzhibangjiao.png"), + IS_KC: require("@/assets/img/shuju/command/ico3/IS_KC.png"), + }, + + searchName: "", + showedSearchResult: false, + searchResult: iniSearchResult(), }; }, @@ -213,15 +372,27 @@ export default { categoryKeys() { this.requestMapDot(); }, + categoryKeys2() { + this.requestMapDot2(); + }, + searchName() { + this.showedSearchResult = false; + this.searchResult = iniSearchResult(); + }, }, async mounted() { //加载组织数据 await this.loadOrgData(); await this.requestMapDot(); + await this.requestMapDot2(); }, methods: { + handleClickMapBox() { + this.showedSearchResult = false; + }, + handleTo(item) { this.$router.push({ path: `/main-shuju/visual-basicinfo-people-list`, @@ -261,10 +432,46 @@ export default { } }, + handleChangeMenuLeft(obj) { + this.coverageTypes2 = [obj.coverageType]; + this.categoryKeys2 = [obj.categoryKey]; + this.placeType2 = obj.placeType; + }, + + handleChangeMenu(list) { + let categoryKeys = []; + let coverageTypes = []; + list.forEach((item) => { + if (item.selected) { + coverageTypes.push(item.coverageType); + } + item.categories.forEach((subitem) => { + if (subitem.selected) { + coverageTypes.push(item.coverageType); + categoryKeys.push(subitem.categoryKey); + } + }); + + item.placeTypesInAnalysis.forEach((subitem) => { + subitem.categories.forEach((subitem2) => { + if (subitem2.selected) { + categoryKeys.push(subitem2.categoryKey); + } + }); + }); + }); + this.categoryKeys = [...new Set(categoryKeys)]; + this.coverageTypes = [...new Set(coverageTypes)]; + this.requestMapDot(); + }, + async requestMapDot() { + if (!this.orgId) return; const url = "/data/aggregator/coverage/dataList"; let params = { - coverageTypes: [], + orgId: this.orgId, + orgType: "agency", + coverageTypes: this.coverageTypes, categoryKeys: this.categoryKeys, isPage: false, }; @@ -278,6 +485,49 @@ export default { } }, + async requestMapDot2() { + if (!this.orgId) return; + this.requestMapDot2Count(); + const url = "/data/aggregator/coverage/dataList-left"; + let params = { + orgId: this.orgId, + orgType: "agency", + coverageTypes: this.coverageTypes2, + categoryKeys: this.categoryKeys2, + isPage: false, + }; + + const { data, code, msg } = await requestPost(url, params); + + if (code === 0) { + this.dotList2 = data.list.map((item) => { + item.categoryKey = this.categoryKeys2[0]; + return item; + }); + } else { + this.$message.error(msg); + } + }, + + async requestMapDot2Count() { + const url = "/data/aggregator/coverage/dataList-left-subtotal"; + let params = { + orgId: this.orgId, + orgType: "agency", + coverageType: this.coverageTypes2[0], + categoryKey: this.categoryKeys2[0], + placeType: this.placeType2, + }; + + const { data, code, msg } = await requestPost(url, params); + + if (code === 0) { + this.gridCountData = [...data]; + } else { + this.$message.error(msg); + } + }, + //子组件点击房间,刷新右侧list refreshInfoList(selId, type) { this.orgId = selId; @@ -318,15 +568,19 @@ export default { //点击组织列表数据 clickAgencyItem(item, index) { - let e = { - selected: [], - }; - let one = { - values_: item, - }; - e.selected.push(one); + console.log(item); + if (item.level == "grid") { + } else { + let e = { + selected: [], + }; + let one = { + values_: item, + }; + e.selected.push(one); - this.toSubAgency("polygon", e); + this.toSubAgency("polygon", e); + } }, //下钻到下一级 type点击的类型:polygon 点击多边形(分为点击组织/小区) people 点击详情 @@ -383,8 +637,67 @@ export default { await this.loadOrgData(); await this.requestMapDot(); + await this.requestMapDot2(); + }, + + async handleSearch() { + const { searchName } = this; + if (!searchName) { + return this.$message.error("请输入搜索内容"); + } + + await this.searchPos(); + + const url = "/data/aggregator/coverage/search"; + let params = { + name: searchName, + pageSize: 10, + }; + + const { data, code, msg } = await requestPost(url, params); + + if (code === 0) { + this.searchResult[1].list = data.userInfos.slice(0, 2); + this.searchResult[1].allList = data.userInfos; + this.searchResult[2].list = data.eventInfos.slice(0, 2); + this.searchResult[2].allList = data.eventInfos; + this.searchResult[3].list = data.resourceInfos.slice(0, 2); + this.searchResult[3].allList = data.resourceInfos; + console.log("检索", this.searchResult); + if (this.searchResult.every((item) => item.list.length == 0)) { + this.$message.error("未检索到相关内容"); + } else { + this.showedSearchResult = true; + } + } else { + this.$message.error(msg); + } + }, + + async searchPos() { + let data = await this.$refs.map.searchPos(this.searchName); + + console.log("检索位置", data); + + if (data && Array.isArray(data.tips) && data.tips.length > 0) { + this.searchResult[0].list = data.tips.slice(0, 2); + this.searchResult[0].allList = data.tips; + } + }, + + handleClickSearchLi(li, item) { + console.log(li); + console.log(item); }, + handleClickSearchResultMore(item) { + console.log(item); + let res = !item.showedMore; + if (res) { + this.searchResult.forEach((item) => (item.showedMore = false)); + } + item.showedMore = !item.showedMore; + }, //开启加载动画 startLoading() { loading = Loading.service({ diff --git a/src/views/modules/visual/cpts/map/command.vue b/src/views/modules/visual/cpts/map/command.vue new file mode 100644 index 000000000..785f3e4ae --- /dev/null +++ b/src/views/modules/visual/cpts/map/command.vue @@ -0,0 +1,679 @@ + + + + + diff --git a/src/views/modules/visual/cpts/map/index.vue b/src/views/modules/visual/cpts/map/index.vue new file mode 100644 index 000000000..0c8bae15c --- /dev/null +++ b/src/views/modules/visual/cpts/map/index.vue @@ -0,0 +1,617 @@ + + + + +