This commit is contained in:
cclu 2025-01-17 18:27:11 +08:00
parent 75dd0a758e
commit 0e7f73f254
11 changed files with 19619 additions and 8675 deletions

BIN
aiMap.zip

Binary file not shown.

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>地图测试</title>
<title>AI全景图</title>
<base href="/"> <!-- 确保这里匹配你的部署路径 -->
</head>
<body>

View File

@ -20,6 +20,7 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 2px 0;
.left{
display: flex;
align-items: center;

View File

@ -72,7 +72,8 @@ const emit = defineEmits<{
:key="index"
>
<div class="left">
<div class="indexBox">{{ index + 1 }}</div>
<!-- <div class="indexBox"></div> -->
<div style="color: #fff">{{ index + 1 }}</div>
<div class="name">{{ item.SERVERPART_NAME || "-" }}</div>
</div>
<div

View File

@ -744,7 +744,7 @@ const handleAnalyzeConfig = async (configDetail: any, answer: any) => {
console.log("newRESPONSE_CONFIG", newRESPONSE_CONFIG);
let newResult: any;
// responseType text json
// responseType text json function
if (OUTPUT_FORMAT.responseType === "text") {
newResult = newRESPONSE_CONFIG
.replace(/"/g, "'")
@ -787,6 +787,13 @@ const handleAnalyzeConfig = async (configDetail: any, answer: any) => {
// }
// }
// );
} else if (OUTPUT_FORMAT.responseType === "function") {
await handleGetConfigFun(
OUTPUT_FORMAT.responseFunName,
req.ServerpartId,
result
);
return null;
} else {
if (OUTPUT_FORMAT.responseFormat === "object") {
newResult = result;
@ -1115,7 +1122,7 @@ const handleInspectionDialogueBox = async (detail: any, otherObj?: any) => {
dialogueList[dialogueList.length - 1].isOver = true;
};
//
//
const handleConfigItemTable = async (
tableData: any,
configObj: any,
@ -1406,7 +1413,7 @@ const handleAnswerQuestions = async () => {
const tableData = await handleAnalyzeConfig(configDetail, data);
console.log("tableData2", tableData);
returnData = tableData;
//
//
if (tableData) {
await handleConfigItemTable(tableData, configDetail, data);
}
@ -1417,8 +1424,10 @@ const handleAnswerQuestions = async () => {
}
}
} else {
// 使id id id
// id
if (data?.AnalysisRuleId) {
// 使id id id
if (req.Sentence.indexOf("基础信息") !== -1) {
//
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox: any = allBoxes[allBoxes.length - 1];
@ -1455,7 +1464,12 @@ const handleAnswerQuestions = async () => {
await handleConfigItemTable(tableData, configDetail, data);
}
}
} else if (req.Sentence.indexOf("预警类型") !== -1) {
emit("handleChangeRightFilterInDialogue", "6");
handleSetWarningData(true);
}
} else {
console.log("noRuleId");
handleLastUpdate("小驿还无法理解,请换个说法,我会不停努力学习的!");
searchRes = "查询失败";
}
@ -1862,6 +1876,7 @@ const emit = defineEmits<{
(e: "handleAreaInspection", index: number): void; //
(e: "handleHiddenSuspended"): void; //
(e: "handleShowAi", value: boolean): void; // ai
(e: "handleChangeRightFilterInDialogue", id: any): void; // watch
}>();
//
@ -1952,12 +1967,15 @@ const handleGetBusinessTrade = async () => {
};
//
const handleSetWarningData = async () => {
const handleSetWarningData = async (noAdd?: boolean) => {
showDialogBox.value = true;
emit("handleShowAi", true);
if (noAdd) {
} else {
handleAddDialogList(
`${props.currentServerPartDetail?.SERVERPART_NAME || ""}预警类型`
);
}
setTimeout(() => {
nextTick(() => {
dialogueList[dialogueList.length - 1].isOver = true;
@ -2079,6 +2097,104 @@ const handleSelectWarning = async (value: number) => {
emit("handleWarningMap", warningData);
};
// id id warningData
const handleWarningConfig = async (id: any, warningData: any) => {
emit("handleChangeRightFilterInDialogue", "6");
let result: string = "";
let SERVERPART_NAME: string = "";
if (id) {
if (warningData && warningData.length > 0) {
let obj: any = {};
let str: string = "";
let objShopName: any = {};
warningData.forEach((item: any) => {
if (item.SERVERPART_NAME) {
SERVERPART_NAME = item.SERVERPART_NAME;
}
if (obj[item.WARNING_TYPE] && obj[item.WARNING_TYPE].length > 0) {
let old: any = obj[item.WARNING_TYPE];
old.push(item);
obj[item.WARNING_TYPE] = old;
} else {
let res: any = [];
res.push(item);
obj[item.WARNING_TYPE] = res;
}
if (
objShopName[item.WARNING_TYPE] &&
objShopName[item.WARNING_TYPE].length > 0
) {
let old: any = objShopName[item.WARNING_TYPE];
old += `${item.SERVERPARTSHOP_NAME}`;
objShopName[item.WARNING_TYPE] = old;
} else {
let old: any = objShopName[item.WARNING_TYPE];
old = `${item.SERVERPARTSHOP_NAME}`;
objShopName[item.WARNING_TYPE] = old;
}
});
console.log("obj", obj);
console.log("objShopName", objShopName);
if (obj) {
for (let key in obj) {
let itemStr: string = `
${descObjRef.value[key]}${objShopName[key]},共${obj[key].length};`;
str += itemStr;
}
}
result = `${SERVERPART_NAME || "-"}预警类型,存在:${str}
的情况您可以鼠标移动到具体服务区查看情况`;
} else {
result = `${SERVERPART_NAME || "-"}暂无预警数据`;
}
}
console.log("result", result);
if (result) {
isNewDialogLoading.value = false;
let obj: any = JSON.parse(
JSON.stringify(dialogueList[dialogueList.length - 1])
);
dialogueList[dialogueList.length - 1] = {
...obj,
isVHtml: true,
VHtml: result || "",
};
await nextTick();
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = result || "";
isPrinting.value = true;
await handlePrintWord(lastBox, lastContent);
let obj: any = JSON.parse(
JSON.stringify(dialogueList[dialogueList.length - 1])
);
dialogueList[dialogueList.length - 1] = {
...obj,
isOver: true,
};
}
}
emit("handleEnterySearch");
emit("handleWarningMap", warningData);
};
// type id id warningData
const handleGetConfigFun = async (type: string, id: any, warningData: any) => {
//
let configFunObj: any = {
handleWarningConfig: (id: any, warningData: any) =>
handleWarningConfig(id, warningData),
};
if (type && configFunObj[type]) {
await configFunObj[type](id, warningData);
}
};
//
const servicepartInspection = (index?: number, inInput?: boolean) => {
searchText.value = "";

File diff suppressed because it is too large Load Diff

View File

View File

@ -142,6 +142,8 @@ const handleGetBusinessProjectList = async () => {
});
}
console.log("scrollIdStr.value", scrollIdStr.value);
// tab length
tabs.forEach((item: any) => {
if (item.key === 0) {
@ -158,16 +160,25 @@ const handleGetBusinessProjectList = async () => {
const list = [inCampList, suspend, closeList, historyList];
console.log("list", list);
allProjectList = list;
onlineProjectList = list[defaultTab];
allProjectList.splice(
0,
allProjectList.length,
...[inCampList, suspend, closeList, historyList]
);
onlineProjectList.splice(
0,
onlineProjectList.length,
...[inCampList, suspend, closeList, historyList][defaultTab]
);
console.log("defaultTab", defaultTab);
nextTick(() => {
selectProjectState.value = defaultTab;
console.log("onlineProjectList3232", onlineProjectList);
const element: any = document.getElementById(scrollIdStr.value!.toString());
if (element) {
element.scrollIntoView({ behavior: "smooth", block: "start" });
}
});
};
@ -588,10 +599,19 @@ watch(
console.log("newVal", newVal);
console.log("oldVal", oldVal);
if (newVal && newVal.SERVERPART_ID) {
selectTab.value = 0
onlineProjectList = [];
tabs = [
{ label: "在营", value: 0, key: 0 },
{ label: "暂停", value: 0, key: 1 },
{ label: "关闭", value: 0, key: 2 },
{ label: "历史", value: 0, key: 3 },
];
handleGetBusinessProjectList();
handleServiceDetail(newVal.SERVERPART_ID);
} else {
nextTick(() => {
selectTab.value = 0
onlineProjectList = [];
tabs = [
{ label: "在营", value: 0, key: 0 },

View File

@ -61,6 +61,9 @@ let selectBusinessTradeList = reactive<any>([]);
let selectBusinessTradeIdsObj = ref<any>();
//
const baseInfoObj = ref<any>();
// watch
let isNoWatch: boolean = false;
let saveData = localStorage.getItem("baseInfoObj");
if (saveData) {
baseInfoObj.value = JSON.parse(saveData);
@ -209,13 +212,24 @@ const handleGetBUSINESS_TRADE = async () => {
});
};
// watch
const handleChangeFilterNoWatch = (id?: string) => {
console.log("handleChangeFilterNoWatch", id);
isNoWatch = true;
selectFilterList.value = id;
nextTick(() => {
isNoWatch = false;
});
};
onMounted(() => {
handleGetBUSINESS_TRADE();
});
//
const emit = defineEmits<{
(e: "handleChangeMapShow", nowSelect: any): void; // selectFilterList.value
(e: "handleChangeMapShow", nowSelect: any, onlyChange: boolean): void; // selectFilterList.value
(e: "handleDeleteSelect"): void; //
(e: "handleHiddenSuspended"): void; //
}>();
@ -228,8 +242,7 @@ const props = defineProps<{
watch(
() => selectFilterList.value,
(newVal, oldVal) => {
console.log("newVal", newVal);
emit("handleChangeMapShow", newVal);
emit("handleChangeMapShow", newVal, isNoWatch);
},
{ deep: true }
);
@ -239,6 +252,7 @@ defineExpose({
form: form,
selectBusinessTradeIdsObj: selectBusinessTradeIdsObj,
selectFilterList: selectFilterList,
handleChangeFilterNoWatch: handleChangeFilterNoWatch,
});
</script>
<template>

View File

@ -17,6 +17,7 @@ import {
handleGetPeriodWarningList,
handleGetProvinceVehicleTreeList,
handleGetServerpartList,
handleGetTransactionDetailList,
} from "./service";
import { handlegetServerConnec } from "../newService";
import { ElLoading, ElMessage } from "element-plus";
@ -117,6 +118,12 @@ let isShowDetail = ref<boolean>(false);
let isShowRealData = ref<boolean>(false);
//
let SPREGIONTYPECOLORList = reactive<any>([]);
//
let realRevenueList = reactive<any>([]);
//
let nowFifthIndex = ref<number>(0);
//
let mapTimer: any;
const route = useRoute();
console.log("route", route);
@ -171,6 +178,8 @@ onMounted(async () => {
handleAllServiceMarkedPoint();
//
handleGetAnHuiBoundary();
//
// handleGetRealServiceList();
hoverPoint.value = handlePointHover();
@ -213,6 +222,7 @@ const handleGetAllService = async () => {
ShowWeather: true, //
};
const data = await handleGetServerpartList(req);
let str: string = "";
console.log("data312312321321321", data);
if (data && data.length > 0) {
let res: any = [];
@ -246,10 +256,15 @@ const handleGetAllService = async () => {
allId.push(item.SERVERPART_ID.toString());
}
}
if (str) {
str += `
${item.SERVERPART_NAME} ${item.SERVERPART_ID}`;
} else {
str = `${item.SERVERPART_NAME} ${item.SERVERPART_ID}`;
}
});
defaultServerPartList = res;
allServerPartIdList = allId;
console.log("SPREGIONTYPECOLORLIST", SPREGIONTYPECOLORLIST);
SPREGIONTYPECOLORList = SPREGIONTYPECOLORLIST;
SPREGIONTYPECOLOR.value = SPREGIONTYPETYPEObj;
@ -450,17 +465,19 @@ const handleAllServiceMarkedPoint = async () => {
scene.value.addLayer(pointLayer);
};
//
//
const handleClickPointLayer = async (detail: any) => {
//
currentServerPartDetail.value = detail;
//
handleAddSelect(detail);
//
handleDeleteNoDefault("");
handleDeleteNoDefault(RightSearchBoxRef.value.selectFilterList);
//
let nowSelect: string = RightSearchBoxRef.value.selectFilterList;
await handleChangeMapShow(nowSelect);
console.log("nowSelect", nowSelect);
await handleChangeMapShow(nowSelect, false);
//
showRightDetail.value = true;
//
@ -546,7 +563,7 @@ const handleChangeToDefault = () => {
current.render();
};
//
//
const handlePointHover = () => {
const el = document.createElement("div");
el.style.background = "#000";
@ -725,6 +742,7 @@ const handleSetCarData = async (
let selectObj: any = {};
let selectRoad: any = {};
//
if (roadTestList && roadTestList.length > 0) {
roadTestList.forEach((item: any) => {
if (item.SERVERPART_ID.toString() === id) {
@ -732,28 +750,45 @@ const handleSetCarData = async (
}
});
}
let roadReq: any = {};
let heightWay: any = [
366, 803, 381, 756, 708, 646, 805, 710, 476, 694, 714, 490, 658, 819, 659,
811, 716, 499, 941, 652, 943, 513, 510, 600, 707, 592, 706,
];
if (heightWay.indexOf(Number(selectObj.SERVERPART_ID)) === -1) {
roadReq = {
RoadName: selectObj.SERVERPART_NAME || "",
CityName: selectObj.SERVERPART_ADDRESS || "",
};
} else {
roadReq = {
let data: any = {};
let roadItem: any = {};
let roadReq: any = {
RoadName: selectObj.EXPRESSWAY_NAME || "",
CityName: selectObj.SERVERPART_ADDRESS || "",
};
data = await handleGetBaiDuTrafficInfo(roadReq);
let roadRes: any = JSON.parse(data);
if (roadRes.status == 2) {
let roadReq: any = {
RoadName: selectObj.SERVERPART_NAME || "",
CityName: selectObj.SERVERPART_ADDRESS || "",
};
data = await handleGetBaiDuTrafficInfo(roadReq);
roadItem = JSON.parse(data);
} else {
roadItem = roadRes;
}
console.log("selectObj", selectObj);
const data = await handleGetBaiDuTrafficInfo(roadReq);
let roadItem: any = JSON.parse(data);
console.log("roadItem", roadItem);
// let roadReq: any = {};
// let heightWay: any = [
// 366, 803, 381, 756, 708, 646, 805, 710, 476, 694, 714, 490, 658, 819, 659,
// 811, 716, 499, 941, 652, 943, 513, 510, 600, 707, 592, 706,
// ];
// if (heightWay.indexOf(Number(selectObj.SERVERPART_ID)) === -1) {
// roadReq = {
// RoadName: selectObj.SERVERPART_NAME || "",
// CityName: selectObj.SERVERPART_ADDRESS || "",
// };
// } else {
// roadReq = {
// RoadName: selectObj.EXPRESSWAY_NAME || "",
// CityName: selectObj.SERVERPART_ADDRESS || "",
// };
// }
// const data = await handleGetBaiDuTrafficInfo(roadReq);
// let roadItem: any = JSON.parse(data);
if (featuresList && featuresList.length > 0) {
featuresList.forEach((item: any) => {
if (item.properties.SERVERPART_ID.toString() === id) {
@ -800,7 +835,10 @@ const handleSetCarData = async (
//
const hanleGetRealTrafficData = async (id: any) => {
let roadList: any = JSON.parse(JSON.stringify(detailText.lineData));
roadList = roadList[baseInfoObj.value.ProvinceCode.toString()];
let roadTestList: any = JSON.parse(JSON.stringify(detailText.roadTest));
roadTestList = roadTestList[baseInfoObj.value.ProvinceCode.toString()];
let onceRoadList: any = {
type: "FeatureCollection",
features: [],
@ -809,6 +847,7 @@ const hanleGetRealTrafficData = async (id: any) => {
let list: any = [];
for (let i = 0; i < id.length; i++) {
//
if (nowSelectId.value.indexOf("2") === -1) {
return;
}
@ -817,6 +856,9 @@ const hanleGetRealTrafficData = async (id: any) => {
roadTestList,
featuresList
);
// if (i > 0) {
// return;
// }
list.push(selectRoad);
onceRoadList.features = list;
@ -825,11 +867,9 @@ const hanleGetRealTrafficData = async (id: any) => {
let haveList: any = allLayers.filter(
(item: any) => item.name === "lineLayerOnce"
);
console.log("haveList", haveList);
if (haveList && haveList.length > 0) {
let obj: any = haveList[0];
console.log("obj", obj);
nextTick(() => {
scene.value.removeLayer(obj);
const lineLayer = new LineLayer({
@ -889,14 +929,19 @@ const hanleGetRealTrafficData = async (id: any) => {
//
const handleGetRealTraffic = async () => {
let roadList: any = JSON.parse(JSON.stringify(detailText.lineData));
roadList = roadList[baseInfoObj.value.ProvinceCode.toString()];
let roadTestList: any = JSON.parse(JSON.stringify(detailText.roadTest));
roadTestList = roadTestList[baseInfoObj.value.ProvinceCode.toString()];
console.log("roadList", roadList);
console.log("roadTestList", roadTestList);
//
let onceRoadList: any = {
type: "FeatureCollection",
features: [],
};
let featuresList: any = roadList.features;
console.log("roadList", roadList);
console.log("featuresList", featuresList);
console.log("currentServerPartDetail.value", currentServerPartDetail.value);
//
@ -950,6 +995,7 @@ const handleDeleteNoDefault = (nowSelect: string) => {
}
if (nowSelect.indexOf("8") === -1) {
isShowRealData.value = false;
clearInterval(mapTimer);
}
} else {
console.log("22222", defaultServerPartList);
@ -968,6 +1014,7 @@ const handleDeleteNoDefault = (nowSelect: string) => {
return colorList1[value];
});
current.render();
clearInterval(mapTimer);
}
};
@ -1390,13 +1437,34 @@ const handleWarningMap = async (warningData: any) => {
if (obj[item.SERVERPART_ID] && obj[item.SERVERPART_ID].length > 0) {
let str: string = "";
const tradeList: any = obj[item.SERVERPART_ID];
tradeList.forEach((key: any) => {
if (str) {
str += `${key.SERVERPARTSHOP_NAME}; `;
} else {
str = `${waringObj[key.WARNING_TYPE]}${key.SERVERPARTSHOP_NAME} `;
// tradeList
let resList: any = [];
let typeList: any = [];
tradeList.forEach((item: any) => {
if (typeList.indexOf(item.WARNING_TYPE) === -1) {
typeList.push(item.WARNING_TYPE);
}
});
typeList.forEach((item: any) => {
let itemStr: string = "";
tradeList.forEach((subItem: any) => {
if (subItem.WARNING_TYPE === item) {
if (itemStr) {
itemStr += `${subItem.SERVERPARTSHOP_NAME}`;
} else {
itemStr = `${waringObj[subItem.WARNING_TYPE]}${
subItem.SERVERPARTSHOP_NAME
} `;
}
}
});
if (str) {
str += itemStr + ";";
} else {
str = itemStr + ";";
}
});
if (
shopIdObj[item.SERVERPART_ID] &&
shopIdObj[item.SERVERPART_ID].length > 0
@ -1409,18 +1477,42 @@ const handleWarningMap = async (warningData: any) => {
handleUpdateMapPoint();
});
console.log("obj33222", obj);
console.log("defaultServerPartList333444", defaultServerPartList);
defaultServerPartList.forEach((item: any) => {
if (obj[item.SERVERPART_ID] && obj[item.SERVERPART_ID].length > 0) {
const newObj: any = JSON.parse(JSON.stringify(item));
let str: string = "";
const tradeList: any = obj[item.SERVERPART_ID];
tradeList.forEach((key: any) => {
if (str) {
str += `${key.SERVERPARTSHOP_NAME}; `;
} else {
str = `${waringObj[key.WARNING_TYPE]}${key.SERVERPARTSHOP_NAME} `;
// tradeList
let resList: any = [];
let typeList: any = [];
tradeList.forEach((item: any) => {
if (typeList.indexOf(item.WARNING_TYPE) === -1) {
typeList.push(item.WARNING_TYPE);
}
});
typeList.forEach((item: any) => {
let itemStr: string = "";
tradeList.forEach((subItem: any) => {
if (subItem.WARNING_TYPE === item) {
if (itemStr) {
itemStr += `${subItem.SERVERPARTSHOP_NAME}; `;
} else {
itemStr = `${waringObj[subItem.WARNING_TYPE]}${
subItem.SERVERPARTSHOP_NAME
} `;
}
}
});
if (str) {
str += itemStr;
} else {
str = itemStr;
}
});
if (
shopIdObj[item.SERVERPART_ID] &&
shopIdObj[item.SERVERPART_ID].length > 0
@ -1452,12 +1544,16 @@ const handleWarningMap = async (warningData: any) => {
scene.value.addLayer(warningLayer);
};
//
const handleChangeMapShow = async (nowSelect: string) => {
// onlyChange true
const handleChangeMapShow = async (nowSelect: string, onlyChange: boolean) => {
//
handleDeleteNoDefault(nowSelect);
console.log("nowSelect", nowSelect);
nowSelectId.value = nowSelect;
if (onlyChange) {
return;
}
//
if (nowSelect) {
if (nowSelect.indexOf("1") !== -1) {
@ -1522,6 +1618,8 @@ const handleChangeMapShow = async (nowSelect: string) => {
nextTick(async () => {
//
handleServiceBusy();
//
handleGetRealServiceList();
});
}
}
@ -1581,9 +1679,24 @@ const handleServiceBusy = async () => {
//
const handleAreaInspection = async (i: number) => {
if (i < defaultServerPartList.length) {
let list = [];
if (defaultServerPartList && defaultServerPartList.length > 0) {
let firstObj: any = {};
let otherList: any = [];
defaultServerPartList.forEach((item: any) => {
if (item.SERVERPART_ID === 416) {
firstObj = item;
} else {
otherList.push(item);
}
});
list = otherList;
list.unshift(firstObj);
}
if (i < list.length) {
// i
currentServerPartDetail.value = defaultServerPartList[i];
currentServerPartDetail.value = list[i];
//
handleDeleteNoDefault("");
//
@ -1592,7 +1705,7 @@ const handleAreaInspection = async (i: number) => {
handleAddSelect(currentServerPartDetail.value);
console.log(i, currentServerPartDetail.value);
//
await handleChangeMapShow("1,2,4");
await handleChangeMapShow("1,2,4", false);
//
let answerData: any =
await RobotDialogueBoxRef.value.handleInspectionQuestions(
@ -1675,6 +1788,158 @@ const handleShowAi = (value: boolean) => {
const handleShowDetail = (value: boolean) => {
isShowDetail.value = value;
};
//
const handleChangeRightFilterInDialogue = (id?: string) => {
RightSearchBoxRef.value.handleChangeFilterNoWatch(id);
};
// div
const handleGetRealServiceList = async () => {
const req: any = {
ProvinceCode: baseInfoObj.value.ProvinceCode,
};
const data = await handleGetTransactionDetailList(req);
console.log("handleGetRealServiceList", data);
realRevenueList = data;
let list: any = handleShowRevenuePoint(data);
console.log("listdadasd", list);
let bigIndex: number = list.length;
// div 10
// ID
console.log("bigIndex", bigIndex);
handleShowMapPoint(list[nowFifthIndex.value]);
nowFifthIndex.value++;
mapTimer = setInterval(() => {
if (bigIndex <= nowFifthIndex.value) {
nowFifthIndex.value = 0;
}
scene.value.removeAllMarkers();
handleShowMapPoint(list[nowFifthIndex.value]);
nowFifthIndex.value++;
}, 10000);
};
// div 10
const handleShowMapPoint = async (list: any) => {
console.log("list", list);
console.log("defaultServerPartList", defaultServerPartList);
let detailObj: any = {};
if (list && list.length > 0) {
list.forEach((item: any) => {
detailObj[item.Serverpart_ID] = item;
});
}
console.log("detailObj", detailObj);
defaultServerPartList.forEach((item: any) => {
if (detailObj[item.SERVERPART_ID]) {
let obj = detailObj[item.SERVERPART_ID];
item.realRevenueDetail = obj;
const el = document.createElement("div");
el.style.maxWidth = "20rem";
el.style.boxSizing = "border-box";
el.style.padding = "6px";
el.style.background = "rgba(56, 56, 56, 0.8)";
el.style.borderRadius = "8px";
el.style.color = "#fff";
el.style.fontSize = "1rem";
// innerHTML
let listStr: string = "";
if (obj.TimeList && obj.TimeList.length > 0) {
if (obj.TimeList && obj.TimeList.length > 1) {
obj.TimeList = obj.TimeList.slice(0, 1);
}
obj.TimeList.forEach((subItem: any) => {
let smallStr: string = "";
if (subItem.sellList && subItem.sellList.length > 0) {
subItem.sellList.forEach((thirdItem: any) => {
if (smallStr) {
smallStr += `,${thirdItem.CommodityName}${thirdItem.SellCount}`;
} else {
smallStr = `${thirdItem.CommodityName}${thirdItem.SellCount}`;
}
});
}
let shop: string = `<div style="white-space: wrap;">${subItem.ServerpartShop_Name}${smallStr}</div>`;
listStr += shop;
});
}
el.innerHTML = `<div style="white-space: wrap;">${obj.Serverpart_Name}</div><div style="white-space: wrap;">实时交易金额:${obj.CurRevenueAmount}元</div>${listStr}`;
const marker = new Marker({ element: el }).setLnglat([
item.SERVERPART_X,
item.SERVERPART_Y,
] as any);
scene.value.addMarker(marker);
} else {
item.realRevenueDetail = undefined;
}
});
// return;
// defaultServerPartList.forEach((item: any) => {
// if (item.weatherModel) {
// if (item.weatherModel.DAY_WEATHER_PIC) {
// const el = document.createElement("div");
// el.style.width = "32px";
// el.style.height = "24px";
// el.style.paddingBottom = "4px";
// el.style.textAlign = "center";
// // <img>
// const img = document.createElement("img");
// img.src = item.weatherModel.DAY_WEATHER_PIC;
// img.style.width = "15px";
// img.style.height = "15px";
// img.style.borderRadius = "50%"; //
// // img.title = item.DAY_WEATHER
// el.appendChild(img);
// const marker = new Marker({ element: el }).setLnglat([
// item.SERVERPART_X,
// item.SERVERPART_Y,
// ] as any);
// if (currentServerPartDetail.value) {
// if (
// item.SERVERPART_ID === currentServerPartDetail.value.SERVERPART_ID
// ) {
// scene.value.addMarker(marker);
// }
// } else if (
// searchSelectServerPartId &&
// searchSelectServerPartId.length > 0
// ) {
// if (
// searchSelectServerPartId.indexOf(item.SERVERPART_ID.toString()) !==
// -1
// ) {
// scene.value.addMarker(marker);
// }
// } else {
// scene.value.addMarker(marker);
// }
// }
// }
// });
};
// div
const handleShowRevenuePoint = (list: any) => {
// nowFifthIndex
if (list && list.length > 0) {
let newList: any = JSON.parse(JSON.stringify(list));
console.log("newList", newList);
// 5
let paginated = [];
for (let i = 0; i < newList.length; i += 5) {
paginated.push(newList.slice(i, i + 5));
}
return paginated;
}
};
</script>
<template>
@ -1688,6 +1953,7 @@ const handleShowDetail = (value: boolean) => {
@handleAreaInspection="handleAreaInspection"
@handleHiddenSuspended="handleHiddenSuspended"
@handleShowAi="handleShowAi"
@handleChangeRightFilterInDialogue="handleChangeRightFilterInDialogue"
:currentServerPartDetail="currentServerPartDetail"
:allServerPartIdList="allServerPartIdList"
/>

View File

@ -198,3 +198,14 @@ export async function handleGetMapConfigByProvinceCode(params: any) {
}
return data.Result_Data;
}
// 服务区门店的实时数据
export async function handleGetTransactionDetailList(params: any) {
const data: any = await requestCode.get('/Revenue/GetTransactionDetailList', params)
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data.List
}