This commit is contained in:
汪汇 2024-01-17 17:28:01 +08:00
parent 9c5188e864
commit 32203d8aae
1 changed files with 30 additions and 37 deletions

View File

@ -41,7 +41,7 @@
shape="round"
background="#4fc08d00"
placeholder=""
@change="getlist(dropdown.serch)"
@change="getlist()"
/>
<van-dropdown-menu>
<van-dropdown-item
@ -86,7 +86,7 @@
</div>
</div>
<van-divider
v-if="dropdown.rmyy.length < count"
v-if="dropdown.rmyy.length < count && dropdown.rmyy.length !== 0"
@click="getlists()"
:style="{
color: '#1989fa',
@ -120,7 +120,7 @@
<img
style="width: 100%; height: 100%; border-radius: 5px"
:src="
showdata.tp ||
showdata.img ||
'https://ts4.cn.mm.bing.net/th?id=OIP-C.loXEDwoMcxdPH4Ka75v3qgHaFU&w=294&h=211&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2'
"
alt=""
@ -177,7 +177,7 @@ import img16 from "@/assets/home/yxfwxz.png";
import img17 from "@/assets/home/yy.png";
import img18 from "@/assets/home/wdwz.png";
import img19 from "@/assets/home/xzwz.png";
const count = ref("0");
const count = ref(0);
var map = null;
var control = null;
var T = window.T;
@ -263,8 +263,11 @@ const init = () => {
//
map.addControl(control);
control.setPosition(T_ANCHOR_TOP_RIGHT);
var lo = new T.Geolocation();
lo.getCurrentPosition(fn);
};
const fn = function (e) {
console.log(e);
var icon = new T.Icon({
iconUrl: img18,
iconSize: new T.Point(28, 28),
@ -303,7 +306,7 @@ const searchResult = function (result) {
const yxfwxz = (e) => {
list.index = e.id;
dropdown.serch = e;
getlist(dropdown.serch);
getlist();
list.page = 1;
};
const touchmove = (event) => {
@ -327,7 +330,6 @@ const yxf = () => {
var LngLats = new T.Marker(new T.LngLat(ss[0], ss[1]), {
icon: icons,
});
// LngLats.addEventListener("click", getinfo(item));
map.addOverLay(LngLats);
addClickHandler(item, LngLats);
});
@ -348,7 +350,6 @@ function addClickHandler(content, LngLats) {
var LngLats = new T.Marker(new T.LngLat(ss[0], ss[1]), {
icon: icons,
});
// LngLats.addEventListener("click", getinfo(item));
map.addOverLay(LngLats);
addClickHandler(item, LngLats);
} else {
@ -361,7 +362,6 @@ function addClickHandler(content, LngLats) {
var LngLats = new T.Marker(new T.LngLat(ss[0], ss[1]), {
icon: icons,
});
// LngLats.addEventListener("click", getinfo(item));
map.addOverLay(LngLats);
addClickHandler(item, LngLats);
}
@ -386,7 +386,6 @@ const addClickHandls = (e) => {
var LngLats = new T.Marker(new T.LngLat(ss[0], ss[1]), {
icon: icons,
});
// LngLats.addEventListener("click", getinfo(item));
map.addOverLay(LngLats);
addClickHandler(item, LngLats);
} else {
@ -399,7 +398,6 @@ const addClickHandls = (e) => {
var LngLats = new T.Marker(new T.LngLat(ss[0], ss[1]), {
icon: icons,
});
// LngLats.addEventListener("click", getinfo(item));
map.addOverLay(LngLats);
addClickHandler(item, LngLats);
}
@ -420,9 +418,8 @@ const columnList = (e) => {
});
};
const getlist = (e) => {
const getlist = () => {
dropdown.rmyy = [];
list.page = 1;
let paly = {
column_id: "",
@ -431,13 +428,8 @@ const getlist = (e) => {
data_sorts: [],
};
let patle = "";
if (!e) {
patle = list.yxfw[0].columnName;
paly.column_id = list.yxfw[0].ids;
} else {
patle = e.columnName;
paly.column_id = e.ids;
}
patle = list.yxfw[list.index].columnName;
paly.column_id = list.yxfw[list.index].ids;
shows.value = true;
http
.post(
@ -447,18 +439,22 @@ const getlist = (e) => {
.then((res) => {
if (res.code == 200) {
dropdown.rmyy = res.data;
let lest = dropdown.rmyy[0].xiang_xi_di_zhi_jing_wei_du.split(",");
map.centerAndZoom(new T.LngLat(lest[0], lest[1]), 12);
count.value = res.count;
console.log(dropdown.rmyy.length);
console.log(count.value);
map.clearOverLays();
yxf();
shows.value = false;
if (dropdown.rmyy.length !== 0) {
let lest = dropdown.rmyy[0].xiang_xi_di_zhi_jing_wei_du.split(",");
map.centerAndZoom(new T.LngLat(lest[0], lest[1]), 12);
count.value = res.count;
map.clearOverLays();
yxf();
shows.value = false;
} else {
count.value = 0;
map.clearOverLays();
shows.value = false;
}
}
});
};
const getlists = (e) => {
const getlists = () => {
list.page = list.page + 1;
let paly = {
column_id: "",
@ -467,15 +463,9 @@ const getlists = (e) => {
data_sorts: [],
};
let patle = "";
if (!e) {
patle = list.yxfw[0].columnName;
paly.column_id = list.yxfw[0].ids;
} else {
patle = e.columnName;
paly.column_id = e.ids;
}
patle = list.yxfw[list.index].columnName;
paly.column_id = list.yxfw[list.index].ids;
shows.value = true;
console.log(list.yxfw[0]);
http
.post(
`/srv/platform/map/list/${patle}?page=${list.page}&size=${list.size}`,
@ -595,8 +585,10 @@ const getlists = (e) => {
height: calc(100% - 132px);
overflow: auto;
padding-bottom: 80px;
.card ::-webkit-scrollbar {
display: none; /* Chrome Safari */
display: none;
/* Chrome Safari */
}
.cardlist {
@ -700,6 +692,7 @@ const getlists = (e) => {
:deep(.van-search) {
padding: 0px 12px 10px;
}
.wrapper {
position: absolute;
top: 45%;