This commit is contained in:
cclu 2024-12-02 19:40:59 +08:00
parent d39becc206
commit 09c304fa7a
11 changed files with 654 additions and 43 deletions

BIN
aiMap.zip

Binary file not shown.

View File

@ -2,7 +2,7 @@
* @Author: cclu 1106109051@qq.com
* @Date: 2024-11-18 11:54:00
* @LastEditors: cclu 1106109051@qq.com
* @LastEditTime: 2024-11-26 16:56:07
* @LastEditTime: 2024-11-29 11:57:57
* @FilePath: \aiRobot\eslint.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -20,14 +20,9 @@ module.exports = {
ecmaVersion: 2020,
},
rules: {
// 自定义规则
"no-nested-ternary": 1,
"no-use-before-define": 1,
"no-param-reassign": 0,
"no-plusplus": 0,
"eqeqeq": 0,
"no-useless-escape": 0,
"prefer-destructuring": 0,
"no-lonely-if": 0
'vue/max-attributes-per-line': ['error', {
'singleline': 3
}],
'@typescript-eslint/no-explicit-any': 'off',
},
};

View File

@ -31,7 +31,7 @@
.dialogBox{
padding: 12px;
color: #fff;
width: 650px;
width: 90%;
max-height: calc(100vh - 140px);
white-space: pre-wrap;
background: rgba(56, 56, 56, 0.51);
@ -116,6 +116,14 @@
color: #98aac9!important;
font-weight: bold;
}
.style4{
display: block;
text-indent: 2rem;
}
.style5{
display: block;
text-indent: 4rem;
}
.operateBox{
width: 100%;
display: flex;
@ -247,6 +255,10 @@
}
}
}
.loadingBox{
width: 100%;
height: 50px;
}
.userIcon{
width: 28px;
height: 28px;

View File

@ -60,6 +60,12 @@ const printingLoading = ref<boolean>(false);
const printingLoadingText = ref<string>("");
//
const bottomSelect = ref<boolean>(false);
//
const duringInspection = ref<boolean>(false);
//
const inspectionIndex = ref<number>(0);
//
const inputRef = ref<any>();
onMounted(() => {
//
@ -74,7 +80,7 @@ const handleGetShowDailogBox = async () => {
await nextTick(() => {
showDialogBox.value = true;
});
inputRef.value?.focus();
console.log("dialogueList", dialogueList);
// isVHtml VHtml
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
@ -95,11 +101,15 @@ const handleGetShowDailogBox = async () => {
};
dialogueList.push(obj);
showDialogBox.value = true;
setTimeout(() => {
dialogueList[0].text = "猜你想了解:";
dialogueList[0].isOver = true;
isNewDialogLoading.value = false;
nextTick(() => {
//
console.log("inputRef.value", inputRef.value);
inputRef.value?.focus();
});
}, 1000);
}
};
@ -151,6 +161,27 @@ const handleAddDialogList = (text: string) => {
handleScrollToBottom();
isNewDialogLoading.value = true;
};
//
const handleAddUserDialog = (text: string) => {
let userObj: any = {
type: 2,
text: text,
isFirst: false,
};
dialogueList.push(userObj);
handleScrollToBottom();
};
//
const handleAddRobotDialog = () => {
let robotObj: any = {
type: 1,
text: "",
isFirst: false,
};
dialogueList.push(robotObj);
handleScrollToBottom();
isNewDialogLoading.value = true;
};
//
const handleLastUpdate = (str: any) => {
dialogueList[dialogueList.length - 1].text = str;
@ -928,6 +959,111 @@ const handleGetResFieldRes = (obj: any, config: any) => {
return str;
};
//
const handleInspectionDialogueBox = async (detail: any, otherObj?: any) => {
//
let str: string = `${
props.currentServerPartDetail.SERVERPART_NAME
}<span class="style4">天气情况${
props.currentServerPartDetail.weatherModel
? `<span class="style5">${"今天"}(${moment().format("YYYY-MM-DD")})${
detail.weatherModel.DAY_WEATHER
}转${detail.weatherModel.NIGHT_WEATHER}气温${
detail.weatherModel.NIGHT_AIR_TEMPERATURE
}~${
detail.weatherModel.DAY_AIR_TEMPERATURE
}</span><span class="style5">${"明天"}(${moment()
.add(1, "d")
.format("YYYY-MM-DD")})${detail.tmwWeatherModel.DAY_WEATHER}转${
detail.tmwWeatherModel.NIGHT_WEATHER
}气温${detail.tmwWeatherModel.NIGHT_AIR_TEMPERATURE}~${
detail.tmwWeatherModel.DAY_AIR_TEMPERATURE
}</span>`
: "暂无天气数据"
}</span><span class="style4">实时路况(${moment().format(
"MM月DD日 HH时mm分"
)})<span class="style5">${
detail?.roadConditions
? `${
detail?.roadConditions?.EXPRESSWAY_NAME
? detail?.roadConditions?.EXPRESSWAY_NAME + ""
: ""
}${detail?.roadConditions?.evaluation.status_desc || ""}`
: "暂无实况车流数据"
} </span></span><span class="style4">车辆归属地情况${
detail?.provinceListTooltip && detail?.provinceListTooltip.length > 0
? `${detail?.provinceListTooltip
.map((item: any) => {
return `<span class="style5">${moment(
moment().startOf("year")
).format("YYYY年MM月")}至${moment().format("YYYY年MM月")}${
detail?.SERVERPART_NAME || ""
}总入区车流${formatNumber(item.TotalCount || 0)}</span>${
item.children && item.children.length > 0
? item.children
.map((subItem: any) => {
return `<span class="style5">${
subItem.ProvinceOrCityName
}占比${formatNumber(
(subItem.TotalCount / item.TotalCount) * 100
)}%Top3${
subItem.children && subItem.children.length > 0
? subItem.children
.map((thirdItem: any) => {
return thirdItem.ProvinceOrCityName !== "其他"
? `${thirdItem.ProvinceOrCityName}`
: "";
})
.join("")
: ""
}</span>`;
})
.join("")
: ""
}`;
})
.join("")}`
: "暂无车辆归属地数据"
}</span>${
otherObj
? `${
otherObj?.businessText
? `<span class="style4">经营数据:${otherObj?.businessText}</span>`
: ""
}${
otherObj?.merchantText
? `<span class="style4">在营商家:${otherObj?.merchantText}</span>`
: ""
}`
: ""
}`;
//
isNewDialogLoading.value = false;
//
let obj: any = JSON.parse(
JSON.stringify(dialogueList[dialogueList.length - 1])
);
//
obj.VHtml = str;
//
dialogueList[dialogueList.length - 1] = {
...obj,
isVHtml: true,
};
await nextTick();
//
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = str;
isPrinting.value = true;
await handlePrintWord(lastBox, lastContent);
}
dialogueList[dialogueList.length - 1].isOver = true;
};
//
const handleConfigItemTable = async (
tableData: any,
@ -969,7 +1105,7 @@ const handleConfigItemTable = async (
//
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox = allBoxes[allBoxes.length - 1];
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = str;
isPrinting.value = true;
@ -1072,10 +1208,6 @@ const handleConfigItemTable = async (
isNewDialogLoading.value = false;
}
console.log(
"configObjconfigObjconfigObjconfigObjconfigObjconfigObjconfigObj",
configObj
);
// PDF
// else {
@ -1105,6 +1237,40 @@ const handleScrollToBottom = () => {
}, 100);
};
//
const handleInspectionQuestions = async (text: string) => {
const req: any = {
Sentence: text,
ProvinceCode: "340000",
DialogCode: thisQuestionId.value || "",
};
const data = await handleTranslateSentence(req);
let configDetail: any;
let res: any;
const configList: any = await handleGetANALYSISRULEList({
searchParameter: {
ANALYSISRULE_IDS: data?.AnalysisRuleId,
current: 1,
pageSize: 10,
},
sortstr: "RULE_PRIORITY asc",
PageIndex: 1,
pagesize: 999999,
});
//
if (configList && configList.length > 0) {
configDetail = configList[0];
}
console.log("configDetail", configDetail);
//
if (configDetail) {
const tableData = await handleAnalyzeConfig(configDetail, data);
console.log("tableData3", tableData);
res = tableData;
}
return res;
};
//
const handleAnswerQuestions = async () => {
const req: any = {
@ -1118,7 +1284,7 @@ const handleAnswerQuestions = async () => {
console.log("data", data);
let searchRes: string = "";
let returnData: any;
if (data.ServerpartId) {
if (data.ShowMapPoint) {
//
@ -1152,6 +1318,14 @@ const handleAnswerQuestions = async () => {
if (data?.RevenueAnalysis) {
//
if (data?.AnalysisRuleId) {
//
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = `<span class="style4">为您查找相关数据</span>`;
isPrinting.value = true;
await handlePrintWord(lastBox, lastContent);
}
// id
// id id id configDetail
let configDetail: any;
@ -1179,6 +1353,7 @@ const handleAnswerQuestions = async () => {
if (configDetail) {
const tableData = await handleAnalyzeConfig(configDetail, data);
console.log("tableData2", tableData);
returnData = tableData;
//
if (tableData) {
await handleConfigItemTable(tableData, configDetail, data);
@ -1191,6 +1366,14 @@ const handleAnswerQuestions = async () => {
} else {
// 使id id id
if (data?.AnalysisRuleId) {
//
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = `<span class="style4">为您查找相关数据</span>`;
isPrinting.value = true;
await handlePrintWord(lastBox, lastContent);
}
// id
// id id id configDetail
let configDetail: any;
@ -1310,20 +1493,42 @@ const handleAnswerQuestions = async () => {
} else {
thisQuestionId.value = logData?.DIALOG_CODE;
}
return returnData;
};
//
const handleSubmit = async () => {
//
emit("handleHiddenSuspended");
if (searchText.value) {
//
handleAddDialogList(searchText.value);
//
await handleAnswerQuestions();
//
if (searchText.value === "开启巡检" || searchText.value === "开始巡检") {
handleAddDialogList(searchText.value);
inspectionIndex.value = 0;
servicepartInspection(0, true);
} else if (searchText.value === "继续巡检") {
handleAddDialogList(searchText.value);
servicepartInspection(inspectionIndex.value, true);
} else {
//
handleAddDialogList(searchText.value);
//
await handleAnswerQuestions();
inputRef.value?.focus();
}
}
};
//
const handleClickTab = async (value: number) => {
//
if (isPrinting.value) {
return;
}
//
emit("handleHiddenSuspended");
selectTab.value = value;
if (value === 0) return;
@ -1437,7 +1642,7 @@ const handleServerpartBasicInfo = async (config: any) => {
await nextTick();
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox = allBoxes[allBoxes.length - 1];
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = data.ServerpartInfo.SERVERPART_INFO || "";
isPrinting.value = true;
@ -1537,6 +1742,9 @@ const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
//
const handleStopPrint = () => {
isPrinting.value = false;
if (duringInspection.value) {
closeInspection();
}
};
//
@ -1559,16 +1767,19 @@ const emit = defineEmits<{
(e: "handleLightServerpart", infoList: any): void; //
(e: "handleEnterySearch"): void; //
(e: "handleWarningMap", warningData: any): void; //
(e: "handleAreaInspection", index: number): void; //
(e: "handleHiddenSuspended"): void; //
}>();
//
watch(
() => props.currentServerPartDetail,
(newVal, oldVal) => {
console.log("new", newVal);
console.log("old", oldVal);
if (newVal) {
if (selectTab.value !== 0) {
//
if (selectTab.value !== 0 && !duringInspection.value) {
console.log("new", newVal);
console.log("old", oldVal);
handleClickTab(selectTab.value);
}
}
@ -1716,12 +1927,14 @@ const handleSelectWarning = async (value: number) => {
if (obj) {
for (let key in obj) {
let itemStr: string = `
${descObjRef.value[key]}${objShopName[key]},共${obj[key].length}`;
${descObjRef.value[key]}${objShopName[key]},共${obj[key].length};`;
str += itemStr;
}
}
result = `${props?.currentServerPartDetail.SERVERPART_NAME}预警类型,存在:${str}
的情况您可以鼠标移动到具体服务区查看情况`;
的情况您可以鼠标移动到具体服务区查看情况`;
} else {
result = `${props?.currentServerPartDetail.SERVERPART_NAME}暂无预警数据`;
}
} else {
let serverpartId: any = [];
@ -1753,7 +1966,7 @@ const handleSelectWarning = async (value: number) => {
await nextTick();
const allBoxes = document.querySelectorAll(".dialogueTextBox-text");
const lastBox = allBoxes[allBoxes.length - 1];
const lastBox: any = allBoxes[allBoxes.length - 1];
if (lastBox) {
const lastContent = result || "";
isPrinting.value = true;
@ -1771,6 +1984,54 @@ const handleSelectWarning = async (value: number) => {
emit("handleWarningMap", warningData);
};
//
const servicepartInspection = (index?: number, inInput?: boolean) => {
searchText.value = "";
if (inInput) {
} else {
//
if (inspectionIndex.value === 0) {
//
handleAddDialogList("服务区巡检");
} else {
//
handleAddRobotDialog();
}
}
//
duringInspection.value = true;
emit("handleAreaInspection", inspectionIndex.value);
};
//
const handleCloseInspection = () => {
duringInspection.value = false;
isPrinting.value = false;
};
//
const closeInspection = () => {
duringInspection.value = false;
// inspectionIndex.value = 0;
};
//
watch(
() => dialogueList,
(newVal, oldVal) => {
console.log("new", newVal);
console.log("old", oldVal);
//
if (newVal && newVal.length > 0 && duringInspection.value) {
let lastObj: any = dialogueList[dialogueList.length - 1];
if (lastObj.isOver) {
inspectionIndex.value += 1;
servicepartInspection(inspectionIndex.value);
}
}
},
{ deep: true }
);
// tab
const handleShowTabList = () => {
bottomSelect.value = !bottomSelect.value;
@ -1787,7 +2048,11 @@ defineExpose({
descListRef,
handleClickTab,
selectTab,
handleSelectWarning
handleSelectWarning,
handleInspectionDialogueBox,
closeInspection,
duringInspection,
handleInspectionQuestions,
});
</script>
@ -1818,13 +2083,17 @@ defineExpose({
class="robotIcon"
src="@/assets/ai/profileIcon.png"
/>
<div
class="dialogueTextBox"
v-loading="isNewDialogLoading && index === dialogueList.length - 1"
>
<div class="dialogueTextBox">
<div class="dialogueTextBox-text">
{{ item.text || "" }}
</div>
<div
class="loadingBox"
v-if="isNewDialogLoading && index === dialogueList.length - 1"
v-loading="
isNewDialogLoading && index === dialogueList.length - 1
"
></div>
<div
v-if="item.isFirst && item.isOver"
@ -1843,6 +2112,20 @@ defineExpose({
>
{{ item.label || "" }}
</div>
<div
v-if="!duringInspection"
class="clickItem"
@click="servicepartInspection(inspectionIndex)"
>
{{ inspectionIndex > 0 ? "继续巡检" : "服务区巡检" }}
</div>
<div
v-if="duringInspection"
class="clickItem"
@click="handleCloseInspection()"
>
{{ "暂停巡检" }}
</div>
<img
class="clearClick"
src="@/assets/ai/clearIcon.png"
@ -1975,6 +2258,7 @@ defineExpose({
<!-- 输入框 -->
<div class="inputBox">
<el-input
ref="inputRef"
class="searchText"
placeholder="Hi,您好!请输入您想了解的服务区..."
v-model="searchText"
@ -2017,6 +2301,20 @@ defineExpose({
>
{{ item.label || "" }}
</div>
<div
v-if="!duringInspection"
class="filterItem"
@click="servicepartInspection(inspectionIndex)"
>
{{ inspectionIndex > 0 ? "继续巡检" : "服务区巡检" }}
</div>
<div
v-if="duringInspection"
class="filterItem"
@click="handleCloseInspection()"
>
{{ "暂停巡检" }}
</div>
</div>
<img
class="filterIcon"

View File

@ -0,0 +1,43 @@
.rightDetailBox{
width: 100%;
height: 100vh;
.tabTop{
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
.tabBox{
width: calc(100% - 56px);
}
.noTab{
.noTabIcon{
width: 24px;
height: 24px;
cursor: pointer;
}
}
.closeIcon{
width: 24px;
height: 24px;
cursor: pointer;
transform: rotate(-90deg);
}
}
.detailContent{
}
.el-tabs{
box-sizing: border-box;
padding-top: 8px;
.el-tabs__header{
.el-tabs__item{
color: #fff;
font-size: 16px;
}
.is-active{
color: #409eff;
}
}
}
}

View File

@ -0,0 +1,98 @@
<script setup lang="ts">
import { reactive, ref, watch } from "vue";
import "./rightDetail.less";
import { handleGetBrandReceivables } from "../service";
//
let selectTab = ref<number>(0);
//
let tabList: any = [
{ label: "基础信息", value: 1 },
{ label: "在营项目", value: 2 },
];
//
let onlineProjectList = reactive<any>([]);
// tab
const handleClickTab = (tabs: any, event: any) => {
selectTab.value = tabs.props.name;
};
// tab
const handleNoSelectTab = () => {
selectTab.value = 0;
};
//
const handleHideDetail = () => {
emit("handleCloseRightDetail");
};
//
const handleGetBusinessProjectList = async () => {
let req: any = {
ServerpartId: props.currentServerPartDetail.SERVERPART_ID,
ShowProjectSplit: false,
};
const data = await handleGetBrandReceivables(req);
console.log("data", data);
onlineProjectList = data;
};
//
const props = defineProps<{
currentServerPartDetail: any;
}>();
//
watch(
() => props.currentServerPartDetail,
(newVal, oldVal) => {
console.log("newVal", newVal);
console.log("oldVal", oldVal);
if (newVal) {
handleGetBusinessProjectList();
}
},
{ deep: true }
);
//
const emit = defineEmits<{
(e: "handleCloseRightDetail"): void; //
}>();
</script>
<template>
<div class="rightDetailBox">
<div class="tabTop">
<div class="tabBox">
<el-tabs v-model="selectTab" @tab-click="handleClickTab">
<el-tab-pane
v-for="(item, index) in tabList"
:key="index"
:label="item.label"
:name="item.value"
></el-tab-pane>
</el-tabs>
</div>
<div class="noTab">
<img
class="noTabIcon"
src="@/assets/ai/clearIcon.png"
@click="handleNoSelectTab()"
/>
</div>
<img
class="closeIcon"
src="@/assets/ai/dropDown.png"
@click="handleHideDetail()"
/>
</div>
<div class="detailContent">
<div class="projectList"></div>
</div>
</div>
</template>

View File

@ -84,6 +84,20 @@
width: 22px;
height: 22px;
}
}
}
}
.el-popover{
background-color: #000!important;
.el-popover__title{
color: #fff!important;
}
.el-popper__arrow::before{
background-color: #000!important;
}
.is-light{
border-color: #000!important;
}
}

View File

@ -62,12 +62,39 @@ const showFilterList = () => {
};
//
const handleClickFilter = (value: string) => {
emit("handleHiddenSuspended");
if (value === "7") {
selectFilterList.value = "";
filterList.forEach((item: any) => {
item.isSelect = false;
});
emit("handleDeleteSelect");
} else {
//
if (value === "5") {
if (selectFilterList.value) {
// selectFilterList.value 6
if (selectFilterList.value.indexOf("6") !== -1) {
selectFilterList.value = selectFilterList.value.replace("6", "");
nextTick(() => {
filterList.filter((item: any) => item.value === "6")[0].isSelect =
false;
});
}
}
} else if (value === "6") {
if (selectFilterList.value) {
// selectFilterList.value 5
if (selectFilterList.value.indexOf("5") !== -1) {
selectFilterList.value = selectFilterList.value.replace("5", "");
nextTick(() => {
filterList.filter((item: any) => item.value === "5")[0].isSelect =
false;
});
}
}
}
//
if (
value === "5" &&
@ -80,6 +107,7 @@ const handleClickFilter = (value: string) => {
handleShowMoreFormBox();
return;
}
//
if (value === "4" && !props.currentServerPartDetail) {
ElMessage({
@ -88,6 +116,7 @@ const handleClickFilter = (value: string) => {
});
return;
}
console.log("selectFilterList.value", selectFilterList.value);
if (selectFilterList.value) {
if (selectFilterList.value.indexOf(value) === -1) {
@ -177,6 +206,8 @@ onMounted(() => {
//
const emit = defineEmits<{
(e: "handleChangeMapShow", nowSelect: any): void; // selectFilterList.value
(e: "handleDeleteSelect"): void; //
(e: "handleHiddenSuspended"): void; //
}>();
//
@ -187,6 +218,7 @@ const props = defineProps<{
watch(
() => selectFilterList.value,
(newVal, oldVal) => {
console.log("newVal", newVal);
emit("handleChangeMapShow", newVal);
},
{ deep: true }
@ -237,6 +269,12 @@ defineExpose({
/>
</el-form-item>
</el-form>
<div style="width: 100%; display: flex; justify-content: flex-end">
<el-button type="primary" @click="handleClickFilter('5')"
>查询</el-button
>
</div>
</div>
<img
class="closeIcon"

View File

@ -14,7 +14,7 @@
}
.RobotBox{
width: 600px;
width: 40%;
position: absolute;
top: 16px;
left: 16px;
@ -27,5 +27,13 @@
right: 16px;
z-index: 10;
}
.serverpartDetail{
width: 25%;
position: absolute;
top: 0;
right: 0;
z-index: 10;
}
}

View File

@ -20,6 +20,8 @@ import RobotDialogueBox from "./component/RobotDialogueBox.vue";
// @ts-ignore
import RightSearchBox from "./component/RightSearchBox.vue";
// @ts-ignore
import RightDetail from "./component/rightDetail.vue";
// @ts-ignore
import detailText from "./component/detailText";
import { nextTick } from "process";
import moment from "moment";
@ -35,6 +37,8 @@ const scene = ref<any>();
const RobotDialogueBoxRef = ref();
//
const RightSearchBoxRef = ref();
//
const RightDetailRef = ref();
//
const hoverPoint = ref<any>();
//
@ -51,6 +55,8 @@ let searchSelectServerPartId = reactive<any>([]);
let nowSelectId = ref<string>("");
// id
let allServerPartIdList = reactive<any>([]);
//
let showRightDetail = ref<boolean>(true);
onMounted(async () => {
scene.value = new Scene({
@ -315,6 +321,8 @@ const handleClickPointLayer = async (detail: any) => {
//
let nowSelect: string = RightSearchBoxRef.value.selectFilterList;
await handleChangeMapShow(nowSelect);
//
showRightDetail.value = true;
// //
// let selectTab: any = RobotDialogueBoxRef.value.selectTab;
@ -347,6 +355,12 @@ const handleAddSelect = (detail: any) => {
scene.value.addLayer(lightPointLayer);
};
//
const handleDeleteSelect = () => {
handleDeleteLayer("lightPointLayer");
currentServerPartDetail.value = undefined;
};
//
const handleChangeToDefault = () => {
//
@ -1149,11 +1163,14 @@ const handleGetBusinessFormat = async () => {
//
const handleWarningData = async () => {
if (currentServerPartDetail) {
RobotDialogueBoxRef.value.handleSelectWarning()
} else {
await RobotDialogueBoxRef.value.handleSetWarningData();
}
console.log("currentServerPartDetail", currentServerPartDetail);
nextTick(() => {
if (currentServerPartDetail.value) {
RobotDialogueBoxRef.value.handleSelectWarning();
} else {
RobotDialogueBoxRef.value.handleSetWarningData();
}
});
};
//
@ -1325,6 +1342,71 @@ const handleChangeMapShow = async (nowSelect: string) => {
}
}
};
//
const handleAreaInspection = async (i: number) => {
if (i < defaultServerPartList.length) {
// i
currentServerPartDetail.value = defaultServerPartList[i];
//
handleDeleteNoDefault("");
//
hoverPoint.value.style.display = "none";
//
handleAddSelect(currentServerPartDetail.value);
console.log(i, currentServerPartDetail.value);
//
await handleChangeMapShow("1,2,4");
//
let answerData: any =
await RobotDialogueBoxRef.value.handleInspectionQuestions(
`${currentServerPartDetail.value.SERVERPART_NAME}经营数据`
);
let merchantData: any =
await RobotDialogueBoxRef.value.handleInspectionQuestions(
`${currentServerPartDetail.value.SERVERPART_NAME}在营商家`
);
console.log("answerData3213123", answerData);
//
let otherObj: any = {
businessText: answerData,
merchantText: merchantData,
};
nextTick(async () => {
currentServerPartDetail.value = defaultServerPartList[i];
let nowDetail: any = JSON.parse(JSON.stringify(defaultServerPartList[i]));
//
RobotDialogueBoxRef.value.handleInspectionDialogueBox(
nowDetail,
otherObj
);
});
} else {
RobotDialogueBoxRef.value.closeInspection();
}
// for (let i = 0; i < defaultServerPartList.length; i++) {
// const loadingInstance = ElLoading.service({
// fullscreen: true,
// background: "#00000080",
// text: "...",
// });
// loadingInstance.close();
// }
};
//
const handleHiddenSuspended = () => {
hoverPoint.value.style.display = "none";
};
//
const handleCloseRightDetail = () => {
showRightDetail.value = false;
};
</script>
<template>
@ -1335,17 +1417,31 @@ const handleChangeMapShow = async (nowSelect: string) => {
@handleLightServerpart="handleLightServerpart"
@handleEnterySearch="handleEnterySearch"
@handleWarningMap="handleWarningMap"
@handleAreaInspection="handleAreaInspection"
@handleHiddenSuspended="handleHiddenSuspended"
:currentServerPartDetail="currentServerPartDetail"
:allServerPartIdList="allServerPartIdList"
/>
</div>
<div class="rightSearchBox">
<div
class="rightSearchBox"
:style="{ right: showRightDetail ? 'calc(25% + 8px)' : '16px' }"
>
<RightSearchBox
ref="RightSearchBoxRef"
@handleChangeMapShow="handleChangeMapShow"
@handleDeleteSelect="handleDeleteSelect"
@handleHiddenSuspended="handleHiddenSuspended"
:currentServerPartDetail="currentServerPartDetail"
/>
</div>
<div class="serverpartDetail" v-if="showRightDetail">
<RightDetail
ref="RightDetailRef"
:currentServerPartDetail="currentServerPartDetail"
@handleCloseRightDetail="handleCloseRightDetail"
/>
</div>
</div>
</template>

View File

@ -135,4 +135,13 @@ export async function handleGetPeriodWarningList(params: any) {
return data
}
return wrapTreeNode(data.Result_Data.List);
}
}
// 经营项目列表
export async function handleGetBrandReceivables(params: any) {
const data: any = await request.get('/BusinessProject/GetBrandReceivables', params)
if (data.Result_Code !== 100) {
return data
}
return data.Result_Data.List;
}