From e40ee62d3e9b71ffe3432d32a53a00c4097b5708 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 31 Dec 2021 09:03:28 +0800
Subject: [PATCH] +3d 2.5d
---
src/components/mobilePopupOur/index.vue | 94 +++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 86 insertions(+), 8 deletions(-)
diff --git a/src/components/mobilePopupOur/index.vue b/src/components/mobilePopupOur/index.vue
index 0c89a11..92e36be 100644
--- a/src/components/mobilePopupOur/index.vue
+++ b/src/components/mobilePopupOur/index.vue
@@ -7,7 +7,7 @@
<div class="m_p_h_center">
<div>
<div v-if="mBigPopup.search" style="color: #fff">
- 查询结果{{ searchLabel ? "--" + searchLabel : "" }}
+ 查询结果{{ searchLabel ? " -- " + searchLabel : "" }}
</div>
<el-dropdown trigger="click" @command="choiceIt" v-else>
<span class="el-dropdown-link">
@@ -37,7 +37,7 @@
></el-empty>
<mobilePopupOurOnce
v-for="(citem, cindex) in onlyData"
- :key="citem.bgImg + ''"
+ :key="citem.icons + ''"
:ends="onlyData.length - 1 == cindex"
:onceData="citem"
></mobilePopupOurOnce>
@@ -61,10 +61,11 @@
></el-empty>
<mobilePopupOurOnce
v-for="(citem, cindex) in item.child"
- :key="citem.icon + ''"
+ :key="citem.icons"
:ends="item.child.length - 1 == cindex"
:onceData="citem"
></mobilePopupOurOnce>
+ <!-- {{ citem.icon }} -->
<div v-show="item.child.length != 0">
<el-divider content-position="left">
<i class="el-icon-s-promotion"></i> 暂无更多
@@ -80,6 +81,8 @@
<script>
import { getListarc } from "@/api/mobile/public/arc"; //头部下标签页数据
import { mapGetters } from "vuex";
+//搜索
+import { getListSearch } from "@/api/mobile/search/index";
export default {
computed: {
...mapGetters(["mBigPopup", "popupOurOpenData"]),
@@ -107,6 +110,7 @@
// console.log("查询搜索结果", this.mBigPopup.value);
this.fullscreenLoading = false;
this.choiceMain = "搜索";
+ this.getListSearchMethod(this.mBigPopup.value);
return;
}
this.choiceMain = this.popupOurOpenData.qurey; // 进入的主题:列:机构单位,校园建筑
@@ -141,7 +145,7 @@
getDataHeardDown() {
if (this.choiceMain == "机构单位") {
//不请求头部标签页数据
- this.getOutList(this.activeName, this.choiceKey);
+ this.getOutList(this.choiceKey);
return;
}
//获取头下部标签页
@@ -162,10 +166,35 @@
//请求
getOutList(campus, type) {
let that = this;
- this.choiceMethod({ campus: campus, type: type }).then((res) => {
+ let d;
+ if (this.choiceMain == "机构单位") {
+ // 不传标签页
+ d = {
+ type: type,
+ };
+ } else if (
+ this.choiceMain == "生活设施" ||
+ this.choiceMain == "出入口" ||
+ this.choiceMain == "停车场"
+ ) {
+ // 改变传入属性
+ d = {
+ campus: campus,
+ lifetype: type,
+ };
+ } else {
+ d = {
+ campus: campus,
+ type: type,
+ };
+ }
+ this.choiceMethod(d).then((res) => {
const data = res.data.data;
let outList = [];
- if (this.choiceMain == "校园建筑") {
+ if (
+ this.mBigPopup.name == "校园建筑" ||
+ this.mBigPopup.name == "文化风景"
+ ) {
// 校园建筑使用该id获取具体信息
data.forEach((item) => {
let icon = item.tpurl.split(",");
@@ -173,7 +202,9 @@
id: item.id,
name: item.mechanismname,
icon: icon,
+ icons: icon + item.mechanismname, //图片响应改变
from: this.choiceMain,
+ video: item.videourl,
buts:
this.mBigPopup.name == "校园建筑" ||
this.mBigPopup.name == "文化风景"
@@ -185,7 +216,7 @@
//正常获取全部数据
data.records.forEach((item) => {
let icon = item.tpurl.split(",");
- outList.push({
+ let useData = {
name: item.mechanismname,
lntLat: [item.jd, item.wd],
alt: item.gd,
@@ -194,18 +225,21 @@
roll: item.roll,
bgImg: item.tpurl,
icon: icon,
+ icons: icon + item.mechanismname, //图片响应改变
from: this.choiceMain,
QRImg: item.codeurl,
websiteUrl: item.websiteurl,
telePhone: item.telephone,
address: item.address,
introduce: item.introduce,
+ video: item.videourl,
buts:
that.mBigPopup.name == "校园建筑" ||
that.mBigPopup.name == "文化风景"
? ["定位", "实景", "图集"]
: ["定位"],
- });
+ };
+ outList.push(useData);
});
}
that.fullscreenLoading = false;
@@ -216,6 +250,50 @@
that.tabTable[+campus - 1].child = outList;
});
},
+ //搜索请求
+ getListSearchMethod(name) {
+ let val = {
+ mechanismName: name,
+ },
+ that = this;
+ getListSearch(val).then((res) => {
+ if (res.data.code != 200) {
+ return;
+ }
+ const data = res.data.data;
+ //正常获取全部数据
+ let outList = [];
+ data.forEach((item) => {
+ let icon = item.list.tpurl.split(",");
+ let useData = {
+ name: item.list.mechanismname,
+ lntLat: [item.list.jd, item.list.wd],
+ alt: item.list.gd,
+ heading: item.list.heading,
+ pitch: item.list.pitch,
+ roll: item.list.roll,
+ bgImg: item.list.tpurl,
+ icon: icon,
+ icons: icon + item.list.mechanismname, //图片响应改变
+ from: this.choiceMain,
+ QRImg: item.list.codeurl,
+ websiteUrl: item.list.websiteurl,
+ telePhone: item.list.telephone,
+ address: item.list.address,
+ introduce: item.list.introduce,
+ video: item.list.videourl,
+ buts:
+ that.mBigPopup.name == "校园建筑" ||
+ that.mBigPopup.name == "文化风景"
+ ? ["定位", "实景", "图集"]
+ : ["定位"],
+ };
+ outList.push(useData);
+ });
+ that.fullscreenLoading = false;
+ that.onlyData = outList;
+ });
+ },
},
};
</script>
\ No newline at end of file
--
Gitblit v1.9.3