This commit is contained in:
ylj20011123 2025-06-19 19:30:13 +08:00
parent 8334976258
commit 3e35dcaea9
20 changed files with 311 additions and 22 deletions

View File

@ -146,6 +146,19 @@ const handleGetData = async () => {
seriesData: seriesData, seriesData: seriesData,
} }
let BrandConsumptionLevelAI = sessionStorage.getItem('BrandConsumptionLevelAI')
if (BrandConsumptionLevelAI) { } else {
let aiObj: any = {}
for (let i = 0; i < res.category.length; i++) {
aiObj[res.category[i]] = `低消费占比${list[0].data[i]},普通消费占比${list[1].data[i]},高消费占比${list[2].data[i]},`
}
sessionStorage.setItem("BrandConsumptionLevelAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -116,6 +116,7 @@ const handleGetData = async () => {
}) })
} }
let aiObj1: any = {}
// //
let res: any = [] let res: any = []
if (monthList && monthList.length > 0) { if (monthList && monthList.length > 0) {
@ -125,12 +126,14 @@ const handleGetData = async () => {
let newData: any = subItem.data let newData: any = subItem.data
list.push(Number(((newData[item - 1][1]) / 10000).toFixed(2))) list.push(Number(((newData[item - 1][1]) / 10000).toFixed(2)))
}) })
aiObj1[`${item}`] = `工作日平均${list[1]}元,周末平均${list[2]}元,节假日平均${list[3]}`
res.push(list) res.push(list)
}) })
} }
// //
let res2: any = [] let res2: any = []
let aiObj2: any = {}
if (monthList && monthList.length > 0) { if (monthList && monthList.length > 0) {
monthList.forEach((item: number) => { monthList.forEach((item: number) => {
let list: any = [`${item}`] let list: any = [`${item}`]
@ -138,12 +141,14 @@ const handleGetData = async () => {
let newData: any = subItem.data let newData: any = subItem.data
list.push(Number(((newData[item - 1][1]) / 10000).toFixed(2))) list.push(Number(((newData[item - 1][1]) / 10000).toFixed(2)))
}) })
aiObj2[`${item}`] = `工作日平均${list[1]}元,周末平均${list[2]}元,节假日平均${list[3]}`
res2.push(list) res2.push(list)
}) })
} }
// //
let res3: any = [] let res3: any = []
let aiObj3: any = {}
if (monthList && monthList.length > 0) { if (monthList && monthList.length > 0) {
monthList.forEach((item: number) => { monthList.forEach((item: number) => {
let list: any = [`${item}`] let list: any = [`${item}`]
@ -151,6 +156,7 @@ const handleGetData = async () => {
let newData: any = subItem.data let newData: any = subItem.data
list.push(newData[item - 1][1]) list.push(newData[item - 1][1])
}) })
aiObj3[`${item}`] = `工作日平均${list[1]}元,周末平均${list[2]}元,节假日平均${list[3]}`
res3.push(list) res3.push(list)
}) })
} }
@ -163,6 +169,16 @@ const handleGetData = async () => {
} }
realData.value = obj realData.value = obj
let BusinessCaseAI = sessionStorage.getItem('BusinessCaseAI')
if (BusinessCaseAI) { } else {
let aiObj: any = {
"营收金额": aiObj1,
"客单量": aiObj2,
"客单均价": aiObj3,
}
sessionStorage.setItem("BusinessCaseAI", JSON.stringify(aiObj))
}
handleShowData(selectTab.value) handleShowData(selectTab.value)
} }

View File

@ -179,7 +179,7 @@ const handleGetData = async () => {
// const data = await handleGetBusinessTradeRevenue(req) // const data = await handleGetBusinessTradeRevenue(req)
let aiObj: any = {}
let list: any = data.BusinessTradeRank let list: any = data.BusinessTradeRank
let seriesData: any = [] let seriesData: any = []
let realData: any = [] let realData: any = []
@ -200,6 +200,7 @@ const handleGetData = async () => {
name: item.name, name: item.name,
value: item.value value: item.value
}) })
aiObj[item.name] = item.data
}) })
} }
@ -211,6 +212,13 @@ const handleGetData = async () => {
lengedData: lengedData lengedData: lengedData
} }
lengedList.value = lengedLists lengedList.value = lengedLists
let BusinessStructureAI = sessionStorage.getItem('BusinessStructureAI')
if (BusinessStructureAI) { } else {
sessionStorage.setItem("BusinessStructureAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -225,10 +225,14 @@ const handleGetData = async () => {
let orderList = data.TransactionList.data let orderList = data.TransactionList.data
let aiObjCar: any = {}
let aiOrder: any = {}
if (carList && carList.length > 0) { if (carList && carList.length > 0) {
carList.forEach((item: any) => { carList.forEach((item: any) => {
carResList.push((item[1])) carResList.push((item[1]))
carRealResList.push(item[1]) carRealResList.push(item[1])
aiObjCar[`${item[0]}`] = item[1] + '辆'
}) })
} }
@ -237,6 +241,7 @@ const handleGetData = async () => {
category.push(item[0]) category.push(item[0])
orderResList.push((item[1])) orderResList.push((item[1]))
orderRealResList.push(item[1]) orderRealResList.push(item[1])
aiOrder[`${item[0]}`] = item[1] + '笔'
}) })
} }
@ -251,6 +256,16 @@ const handleGetData = async () => {
} }
let ConsumptionConversionAI = sessionStorage.getItem('ConsumptionConversionAI')
if (ConsumptionConversionAI) { } else {
let aiObj: any = {
"时段车流": aiObjCar,
"时段客单": aiOrder
}
sessionStorage.setItem("ConsumptionConversionAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -129,6 +129,7 @@ const handleGetData = async () => {
category = data.legend category = data.legend
let list = data.ColumnList let list = data.ColumnList
if (list && list.length > 0) { if (list && list.length > 0) {
list.forEach((item: any) => { list.forEach((item: any) => {
seriesData.push({ seriesData.push({
@ -153,6 +154,17 @@ const handleGetData = async () => {
seriesData: seriesData, seriesData: seriesData,
} }
let ConsumptionLevelAI = sessionStorage.getItem('ConsumptionLevelAI')
if (ConsumptionLevelAI) { } else {
let aiObj: any = {}
for (let i = 0; i < res.category.length; i++) {
aiObj[res.category[i]] = `低消费占比${list[0].data[i]},普通消费占比${list[1].data[i]},高消费占比${list[2].data[i]},`
}
sessionStorage.setItem("ConsumptionLevelAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -150,7 +150,7 @@ const handleGetData = async () => {
// const data = await handleGetTransactionTimeAnalysis(req) // const data = await handleGetTransactionTimeAnalysis(req)
let aiObj: any = {}
if (data && data.length > 0) { if (data && data.length > 0) {
// //
let orderSum: number = 0 let orderSum: number = 0
@ -158,7 +158,6 @@ const handleGetData = async () => {
orderSum += Number(item.data) orderSum += Number(item.data)
}) })
// data key // data key
data.forEach((item: any, index: number) => { data.forEach((item: any, index: number) => {
if (index < 10) { if (index < 10) {
@ -168,18 +167,20 @@ const handleGetData = async () => {
} }
seriesData.push(Number(((item.data / orderSum) * 100).toFixed(2))) seriesData.push(Number(((item.data / orderSum) * 100).toFixed(2)))
aiObj[`${item.name}`] = item.data + '单'
}) })
} }
let res: any = { let res: any = {
category: category,// x category: category,// x
seriesData: seriesData, seriesData: seriesData,
} }
let ConsumptionPeriodAI = sessionStorage.getItem('ConsumptionPeriodAI')
if (ConsumptionPeriodAI) { } else {
sessionStorage.setItem("ConsumptionPeriodAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -75,7 +75,8 @@ const handleGetMapRealData = async () => {
console.log('实时数据', data); console.log('实时数据', data);
// ai
let aiObj: any = {}
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach((item: any) => { data.forEach((item: any) => {
// //
@ -88,6 +89,7 @@ const handleGetMapRealData = async () => {
// value: item.totalAmount.toString().length > 8 ? Number((item.totalAmount / 10000).toFixed(2)).toLocaleString() : Number(item.totalAmount).toLocaleString(), // value: item.totalAmount.toString().length > 8 ? Number((item.totalAmount / 10000).toFixed(2)).toLocaleString() : Number(item.totalAmount).toLocaleString(),
// unit: item.totalAmount.toString().length > 8 ? '' : '' // unit: item.totalAmount.toString().length > 8 ? '' : ''
// } // }
aiObj["门店营收"] = `${item.totalAmount}${item.totalAmountUnit}`
revenueAmonut.value = obj revenueAmonut.value = obj
} else if (item.dataType === 2000) { } else if (item.dataType === 2000) {
// //
@ -99,6 +101,7 @@ const handleGetMapRealData = async () => {
// value: item.totalCount.toString().length > 8 ? Number((item.totalCount / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(), // value: item.totalCount.toString().length > 8 ? Number((item.totalCount / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(),
// unit: item.totalCount.toString().length > 8 ? '' : '' // unit: item.totalCount.toString().length > 8 ? '' : ''
// } // }
aiObj["油品消耗"] = `${item.totalCount}${item.totalCountUnit}`
oilConsumption.value = obj oilConsumption.value = obj
} else if (item.dataType === 3000) { } else if (item.dataType === 3000) {
// //
@ -110,6 +113,7 @@ const handleGetMapRealData = async () => {
// value: item.totalCount.toString().length > 8 ? Number((item.totalCount / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(), // value: item.totalCount.toString().length > 8 ? Number((item.totalCount / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(),
// unit: item.totalCount.toString().length > 8 ? '' : '' // unit: item.totalCount.toString().length > 8 ? '' : ''
// } // }
aiObj["加水量"] = `${item.totalCount}${item.totalCountUnit}`
waterAddition.value = obj waterAddition.value = obj
} else if (item.dataType === 4000) { } else if (item.dataType === 4000) {
// 尿 // 尿
@ -121,6 +125,7 @@ const handleGetMapRealData = async () => {
// value: item.totalCount.toString().length > 8 ? Number((item.totalCount / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(), // value: item.totalCount.toString().length > 8 ? Number((item.totalCount / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(),
// unit: item.totalCount.toString().length > 8 ? '' : '' // unit: item.totalCount.toString().length > 8 ? '' : ''
// } // }
aiObj["尿素"] = `${item.totalCount}${item.totalCountUnit}`
urea.value = obj urea.value = obj
} else if (item.dataType === 5000) { } else if (item.dataType === 5000) {
// //
@ -132,10 +137,17 @@ const handleGetMapRealData = async () => {
// value: item.totalTicket.toString().length > 8 ? Number((item.totalTicket / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(), // value: item.totalTicket.toString().length > 8 ? Number((item.totalTicket / 10000).toFixed(2)).toLocaleString() : Number(item.totalCount).toLocaleString(),
// unit: item.totalTicket.toString().length > 8 ? '' : '' // unit: item.totalTicket.toString().length > 8 ? '' : ''
// } // }
aiObj["充电次数"] = `${item.totalTicket}${item.totalTicketUnit}`
chargingCycles.value = obj chargingCycles.value = obj
} }
}) })
} }
let CoreBusinessDataAI = sessionStorage.getItem('CoreBusinessDataAI')
if (CoreBusinessDataAI) { } else {
sessionStorage.setItem("CoreBusinessDataAI", JSON.stringify(aiObj))
}
} }

View File

@ -230,6 +230,20 @@ const handleGetData = async () => {
seriesDataWoman: seriesDataWoman// seriesDataWoman: seriesDataWoman//
} }
let CustomerAgeGroupAI = sessionStorage.getItem('CustomerAgeGroupAI')
if (CustomerAgeGroupAI) { } else {
let aiRes: any = {}
for (let i = 0; i < res.category.length; i++) {
aiRes[res.category[i]] = {
"男性": seriesDataMan[i] + '%',
"女性": seriesDataWoman[i] + '%',
}
}
sessionStorage.setItem("CustomerAgeGroupAI", JSON.stringify(aiRes))
}
return res return res
} }

View File

@ -185,6 +185,8 @@ const handleGetData = async () => {
let seriesData: number[] = [] let seriesData: number[] = []
let realData: string[] = [] let realData: string[] = []
let aiObj: any = {}
if (data.CustomerSaleList && data.CustomerSaleList.length > 0) { if (data.CustomerSaleList && data.CustomerSaleList.length > 0) {
let list = data.CustomerSaleList.slice(0, 15) let list = data.CustomerSaleList.slice(0, 15)
@ -192,9 +194,17 @@ const handleGetData = async () => {
category.push(item.BusinessTradeName) category.push(item.BusinessTradeName)
seriesData.push(item.TotalRatio) seriesData.push(item.TotalRatio)
realData.push(item.TotalRatio) realData.push(item.TotalRatio)
aiObj[item.BusinessTradeName] = `占比${item.TotalRatio}%`
}) })
} }
let CustomerConsumptionPreferencesAI = sessionStorage.getItem('CustomerConsumptionPreferencesAI')
if (CustomerConsumptionPreferencesAI) { } else {
sessionStorage.setItem("CustomerConsumptionPreferencesAI", JSON.stringify(aiObj))
}
return { return {
category: category, category: category,
seriesData: seriesData, seriesData: seriesData,

View File

@ -182,18 +182,31 @@ const handleGetData = async () => {
// const data = await handleGetCustomerGroupRatio(req) // const data = await handleGetCustomerGroupRatio(req)
let res: any = [] let res: any = []
let aiObj: any = {}
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach((item: any) => { data.forEach((item: any) => {
// let list: any = [] // let list: any = []
let obj: any = {}
if (item.data && item.data.length > 0) { if (item.data && item.data.length > 0) {
item.data.forEach((subItem: any) => { item.data.forEach((subItem: any) => {
subItem.push(item.name) subItem.push(item.name)
res.push(subItem) res.push(subItem)
obj[`${subItem[0]}`] = `交易金额${subItem[1]}元,占比${subItem[2]}%`
}) })
} }
aiObj[item.name] = obj
// res.push(list) // res.push(list)
}) })
} }
let CustomerGroupAI = sessionStorage.getItem('CustomerGroupAI')
if (CustomerGroupAI) { } else {
sessionStorage.setItem("CustomerGroupAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -140,21 +140,21 @@ const handleGetRealData = async () => {
ProvinceCode: '530000' ProvinceCode: '530000'
} }
let FestivalRevenueSumInfo = sessionStorage.getItem('FestivalRevenueSumInfo') let FestivalRevenueSumInfo = sessionStorage.getItem('FestivalRevenueSumInfo')
let data: any = [] let data: any = []
if (FestivalRevenueSumInfo) { if (FestivalRevenueSumInfo) {
data = JSON.parse(FestivalRevenueSumInfo) data = JSON.parse(FestivalRevenueSumInfo)
} else { } else {
data = await handleGetHolidayRevenueRatio(req) data = await handleGetHolidayRevenueRatio(req)
sessionStorage.setItem("OverviewOfServiceAreaBusiness", JSON.stringify(data)) sessionStorage.setItem("FestivalRevenueSumInfo", JSON.stringify(data))
} }
// const data = await handleGetHolidayRevenueRatio(req) // const data = await handleGetHolidayRevenueRatio(req)
console.log('datadatadatadatadata', data) console.log('datadatadatadatadata', data)
let bigAiObj: any = {}
let smallAiObj: any = {}
// //
let bigData: any = [] let bigData: any = []
let bigType: any = [] let bigType: any = []
@ -170,12 +170,27 @@ const handleGetRealData = async () => {
item.children.forEach((subItem: any) => { item.children.forEach((subItem: any) => {
smallType.push(`${subItem.name} ${subItem.value}%`) smallType.push(`${subItem.name} ${subItem.value}%`)
smallData.push({ name: `${subItem.name} ${subItem.value}%`, value: Number(subItem.value) }) smallData.push({ name: `${subItem.name} ${subItem.value}%`, value: Number(subItem.value) })
smallAiObj[subItem.name] = subItem.value + '%'
}) })
} }
} }
bigAiObj[item.name] = item.value + '%'
}) })
} }
let FestivalRevenueSumInfoAI = sessionStorage.getItem('FestivalRevenueSumInfoAI')
if (FestivalRevenueSumInfoAI) { } else {
let aiObj: any = {
"节假日普通日": bigAiObj,
"具体节假日": smallAiObj
}
sessionStorage.setItem("FestivalRevenueSumInfoAI", JSON.stringify(aiObj))
}
return { return {
bigData: bigData, bigData: bigData,
smallData: smallData, smallData: smallData,

View File

@ -141,11 +141,14 @@ const handleGetSectionFlowCount = async () => {
let realData: any = [] let realData: any = []
let legendData: any = [] let legendData: any = []
let aiObj: any = {}
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach((item: any) => { data.forEach((item: any) => {
if (item.name === '男性' || item.name === '女性') { if (item.name === '男性' || item.name === '女性') {
seriesData.push({ name: `${item.name} ${item.data[0]}%`, value: item.data[0] }) seriesData.push({ name: `${item.name} ${item.data[0]}%`, value: item.data[0] })
legendData.push({ name: `${item.name} ${item.data[0]}%` }) legendData.push({ name: `${item.name} ${item.data[0]}%` })
aiObj[item.name] = item.data[0] + '%'
} }
}) })
} }
@ -157,6 +160,12 @@ const handleGetSectionFlowCount = async () => {
realData: realData,// realData: realData,//
legendData: legendData legendData: legendData
} }
let GenderCustomerGroupAI = sessionStorage.getItem('GenderCustomerGroupAI')
if (GenderCustomerGroupAI) { } else {
sessionStorage.setItem("GenderCustomerGroupAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -64,6 +64,28 @@ const handleGetData = async () => {
let ServerpartTotalCount: number = data.ServerpartTotalCount let ServerpartTotalCount: number = data.ServerpartTotalCount
let OverviewOfServiceAreaAI = sessionStorage.getItem('OverviewOfServiceAreaAI')
if (OverviewOfServiceAreaAI) {
} else {
let res: any = {
"管理站点": data.ServerpartTotalCount,
"服务区": data.serviceAllTotal,
"停车区": data.ParkingServiceCount,
"加水站": data.WaterStationCount,
"观景台": data.ViewingDeckCount,
"休息区": data.RestAreaCount,
"加油站": data.REFUELINGGUNTotal,
"充电桩": data.ChargingStationTotal,
"司机之家": data.HASPILOTLOUNGETotal,
"母婴室": data.NursingRoomTotal,
"尿素": data.URECOUNTTotal,
"加水": data.WaterCount,
}
sessionStorage.setItem('OverviewOfServiceAreaAI', JSON.stringify(res))
}
// if (data && data.length > 0) { // if (data && data.length > 0) {
// data.forEach((item: any) => { // data.forEach((item: any) => {
// serviceAllTotal += 1 // serviceAllTotal += 1
@ -156,8 +178,19 @@ const handleGetData = async () => {
sessionStorage.setItem("OverviewOfServiceAreaBusiness", JSON.stringify(businessData)) sessionStorage.setItem("OverviewOfServiceAreaBusiness", JSON.stringify(businessData))
} }
// AI
let OverviewOfServiceAreaBusinessAI = sessionStorage.getItem('OverviewOfServiceAreaBusinessAI')
if (OverviewOfServiceAreaBusinessAI) {
} else {
let res: any = {
"服务区承载": {
"繁忙": businessData.OtherData.value + '座',
"空闲": businessData.OtherData.data + '座'
}
}
sessionStorage.setItem('OverviewOfServiceAreaBusinessAI', JSON.stringify(res))
}
console.log('服务区繁忙度数据:', businessData);
let businessRes: any = businessData.OtherData let businessRes: any = businessData.OtherData
@ -236,12 +269,12 @@ const handleGetData = async () => {
<div class="OverviewOfServiceAreaContentBottomItem"> <div class="OverviewOfServiceAreaContentBottomItem">
<div class="OverviewOfServiceAreaContentBottomItemLabel">加油站/</div> <div class="OverviewOfServiceAreaContentBottomItemLabel">加油站/</div>
<div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.REFUELINGGUNTotal || "0" <div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.REFUELINGGUNTotal || "0"
}}</div> }}</div>
</div> </div>
<div class="OverviewOfServiceAreaContentBottomItem"> <div class="OverviewOfServiceAreaContentBottomItem">
<div class="OverviewOfServiceAreaContentBottomItemLabel">充电桩/</div> <div class="OverviewOfServiceAreaContentBottomItemLabel">充电桩/</div>
<div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.ChargingStationTotal || "0" <div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.ChargingStationTotal || "0"
}}</div> }}</div>
</div> </div>
<!-- <div class="OverviewOfServiceAreaContentBottomItem"> <!-- <div class="OverviewOfServiceAreaContentBottomItem">
<div class="OverviewOfServiceAreaContentBottomItemLabel">停车位/</div> <div class="OverviewOfServiceAreaContentBottomItemLabel">停车位/</div>
@ -256,17 +289,17 @@ const handleGetData = async () => {
<div class="OverviewOfServiceAreaContentBottomItem"> <div class="OverviewOfServiceAreaContentBottomItem">
<div class="OverviewOfServiceAreaContentBottomItemLabel">母婴室/</div> <div class="OverviewOfServiceAreaContentBottomItemLabel">母婴室/</div>
<div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.NursingRoomTotal || "0" <div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.NursingRoomTotal || "0"
}}</div> }}</div>
</div> </div>
<div class="OverviewOfServiceAreaContentBottomItem"> <div class="OverviewOfServiceAreaContentBottomItem">
<div class="OverviewOfServiceAreaContentBottomItemLabel">尿素/</div> <div class="OverviewOfServiceAreaContentBottomItemLabel">尿素/</div>
<div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.URECOUNTTotal || "0" <div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.URECOUNTTotal || "0"
}}</div> }}</div>
</div> </div>
<div class="OverviewOfServiceAreaContentBottomItem"> <div class="OverviewOfServiceAreaContentBottomItem">
<div class="OverviewOfServiceAreaContentBottomItemLabel">加水/</div> <div class="OverviewOfServiceAreaContentBottomItemLabel">加水/</div>
<div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.WaterCount || "0" <div class="OverviewOfServiceAreaContentBottomItemValue">{{ serviceInfo?.WaterCount || "0"
}}</div> }}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -124,6 +124,7 @@ const handleGetSectionFlowCount = async () => {
let category: any = [] let category: any = []
let seriesData: any = [] let seriesData: any = []
let realData: any = [] let realData: any = []
let aiObj: any = {}
let list: any = data.BusinessTradeRank let list: any = data.BusinessTradeRank
if (list && list.length > 0) { if (list && list.length > 0) {
@ -131,6 +132,7 @@ const handleGetSectionFlowCount = async () => {
category.push({ name: `${item.name}${item.value}%`, max: 100 }) category.push({ name: `${item.name}${item.value}%`, max: 100 })
seriesData.push(Number(item.value)) seriesData.push(Number(item.value))
realData.push(item.data) realData.push(item.data)
aiObj[item.name] = item.value + '%'
}) })
} }
@ -139,6 +141,12 @@ const handleGetSectionFlowCount = async () => {
seriesData: [seriesData],// y seriesData: [seriesData],// y
realData: realData// realData: realData//
} }
let PreferenceTypeAI = sessionStorage.getItem('PreferenceTypeAI')
if (PreferenceTypeAI) { } else {
sessionStorage.setItem("PreferenceTypeAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -163,6 +163,7 @@ const handleGetData = async () => {
// //
let lengedData: any = [] let lengedData: any = []
let aiObj: any = {}
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach((item: any) => { data.forEach((item: any) => {
@ -181,7 +182,7 @@ const handleGetData = async () => {
pieData.push({ value: Number((subItem.TotalRevenue.Revenue_Amount / 10000).toFixed(2)), name: subItem.Serverpart_Name }) pieData.push({ value: Number((subItem.TotalRevenue.Revenue_Amount / 10000).toFixed(2)), name: subItem.Serverpart_Name })
// lengedData.push({ name: subItem.Serverpart_Name, value: subItem.TotalRevenue.Revenue_Amount.toLocaleString() }) // lengedData.push({ name: subItem.Serverpart_Name, value: subItem.TotalRevenue.Revenue_Amount.toLocaleString() })
lengedData.push({ name: subItem.Serverpart_Name, value: Number(((subItem.TotalRevenue.Revenue_Amount / sum) * 100).toFixed(2)) }) lengedData.push({ name: subItem.Serverpart_Name, value: Number(((subItem.TotalRevenue.Revenue_Amount / sum) * 100).toFixed(2)) })
aiObj[subItem.Serverpart_Name] = subItem.TotalRevenue.Revenue_Amount + '元'
}) })
} }
@ -196,6 +197,15 @@ const handleGetData = async () => {
lengedData: lengedData lengedData: lengedData
} }
lengedList.value = lengedData lengedList.value = lengedData
let RegionalRevenueAI = sessionStorage.getItem('RegionalRevenueAI')
if (RegionalRevenueAI) { } else {
sessionStorage.setItem("RegionalRevenueAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -39,18 +39,38 @@ const handleGetData = async () => {
sessionStorage.setItem("TradingAlert", JSON.stringify(data)) sessionStorage.setItem("TradingAlert", JSON.stringify(data))
} }
console.log('skodpijasidjaslfddfas', data); console.log('skodpijasidjaslfddfas', data);
TradingOtherData.value = data.OtherData TradingOtherData.value = data.OtherData
// ai
let AIData: any = []
if (data.List && data.List.length > 0) { if (data.List && data.List.length > 0) {
let list = data.List.slice(0, 10) let list = data.List.slice(0, 10)
TradingAlertList.length = 0; TradingAlertList.length = 0;
list && list.forEach((item: any) => TradingAlertList.push(item)); list && list.forEach((item: any) => {
TradingAlertList.push(item)
AIData.push(`${item.serverpartName}${item.serverpartShopName}${item.exceptionTypeName}`)
});
} else { } else {
TradingAlertList.length = 0; TradingAlertList.length = 0;
} }
let TradingAlertAI = sessionStorage.getItem('TradingAlertAI')
if (TradingAlertAI) { } else {
let res: any = {
"交易预警": {
"必查项": data.OtherData?.value,
"抽查项": data.OtherData?.value
},
"特情事件": AIData
}
sessionStorage.setItem('TradingAlertAI', JSON.stringify(res))
}
} }
</script> </script>
@ -80,7 +100,7 @@ const handleGetData = async () => {
<div class="TradingAlertItemRight"> <div class="TradingAlertItemRight">
<div class="TradingAlertItemRightLabel">抽查项</div> <div class="TradingAlertItemRightLabel">抽查项</div>
<div class="TradingAlertItemRightValueBox"> <div class="TradingAlertItemRightValueBox">
<div class="TradingAlertItemRightValue">{{ TradingOtherData?.data || '' }}</div> <div class="TradingAlertItemRightValue">{{ TradingOtherData?.value || '' }}</div>
<div class="OverviewOfServiceAreaBusyContentItemRightUnit"></div> <div class="OverviewOfServiceAreaBusyContentItemRightUnit"></div>
</div> </div>

View File

@ -219,21 +219,27 @@ const handleGetSectionFlowCount = async () => {
let seriesData: number[] = [] let seriesData: number[] = []
let realData: number[] = [] let realData: number[] = []
let AIData: any = {}
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach((item: any) => { data.forEach((item: any) => {
category.push(`${item.Statistics_Month}`) category.push(`${item.Statistics_Month}`)
seriesData.push(Number((item.SectionFlow_Count / 10000).toFixed(2))) seriesData.push(Number((item.SectionFlow_Count / 10000).toFixed(2)))
realData.push(item.SectionFlow_Count) realData.push(item.SectionFlow_Count)
AIData[`${item.Statistics_Month}`] = item.SectionFlow_Count + '辆'
}) })
} }
let yesSeriesData: number[] = [] let yesSeriesData: number[] = []
let yesRealData: number[] = [] let yesRealData: number[] = []
let yesAIData: any = {}
if (yesData && yesData.length > 0) { if (yesData && yesData.length > 0) {
yesData.forEach((item: any) => { yesData.forEach((item: any) => {
yesSeriesData.push(Number((item.SectionFlow_Count / 10000).toFixed(2))) yesSeriesData.push(Number((item.SectionFlow_Count / 10000).toFixed(2)))
yesRealData.push(item.SectionFlow_Count) yesRealData.push(item.SectionFlow_Count)
yesAIData[`${item.Statistics_Month}`] = item.SectionFlow_Count + '辆'
}) })
} }
@ -268,6 +274,13 @@ const handleGetSectionFlowCount = async () => {
addRateList: addRateList addRateList: addRateList
} }
let TrendOfTrafficFlowYesAI = sessionStorage.getItem('TrendOfTrafficFlowYesAI')
if (TrendOfTrafficFlowYesAI) { } else {
let aiObj: any = {}
aiObj[`${res.currentYear}年断面流量`] = AIData
aiObj[`${res.yesYear}年断面流量`] = yesAIData
sessionStorage.setItem("TrendOfTrafficFlowYesAI", JSON.stringify(aiObj))
}
return res return res
} }

View File

@ -191,6 +191,8 @@ const handleGetData = async () => {
let VehicleModelStay = sessionStorage.getItem('VehicleModelStay') let VehicleModelStay = sessionStorage.getItem('VehicleModelStay')
let data: any = [] let data: any = []
let aiData: any = {}
if (VehicleModelStay) { if (VehicleModelStay) {
data = JSON.parse(VehicleModelStay) data = JSON.parse(VehicleModelStay)
} else { } else {
@ -204,9 +206,12 @@ const handleGetData = async () => {
category.push(item.name) category.push(item.name)
seriesData.push(Number((Number(item.value) / 10000).toFixed(2))) seriesData.push(Number((Number(item.value) / 10000).toFixed(2)))
realData.push(Number(item.value)) realData.push(Number(item.value))
aiData[`${item.name}`] = item.value + "元"
}) })
} }
let yesAiData: any = {}
const lastYearReq: any = { const lastYearReq: any = {
StatisticsDate: moment().subtract(1, 'y').format('YYYY'), StatisticsDate: moment().subtract(1, 'y').format('YYYY'),
// ProvinceCode: '340000', // ProvinceCode: '340000',
@ -219,6 +224,8 @@ const handleGetData = async () => {
lastYearData.forEach((item: any) => { lastYearData.forEach((item: any) => {
seriesDataLastYear.push(Number((Number(item.value) / 10000).toFixed(2))) seriesDataLastYear.push(Number((Number(item.value) / 10000).toFixed(2)))
realDataLastYear.push(Number(item.value)) realDataLastYear.push(Number(item.value))
yesAiData[`${item.name}`] = item.value + "元"
}) })
} }
@ -249,6 +256,17 @@ const handleGetData = async () => {
lastYear: moment().subtract(1, 'y').format('YYYY'), lastYear: moment().subtract(1, 'y').format('YYYY'),
addList: addList addList: addList
} }
let VehicleModelStayAI = sessionStorage.getItem('VehicleModelStayAI')
if (VehicleModelStayAI) { } else {
let aiRes: any = {}
aiRes[`${res.currentYear}`] = aiData
aiRes[`${res.lastYear}`] = yesAiData
sessionStorage.setItem("VehicleModelStayAI", JSON.stringify(aiRes))
}
return res return res
} }

View File

@ -369,6 +369,9 @@ const handleGetSectionFlowCount = async () => {
let realDataCar: number[] = [] let realDataCar: number[] = []
let realDataRevenue: number[] = [] let realDataRevenue: number[] = []
let aiObj: any = {}
let aiRevenueObj: any = {}
console.log('dnasfhuaidhsdaghsakjlhsldk', data); console.log('dnasfhuaidhsdaghsakjlhsldk', data);
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach((item: any) => { data.forEach((item: any) => {
@ -377,6 +380,10 @@ const handleGetSectionFlowCount = async () => {
realDataCar.push(item.Vehicle_Count) realDataCar.push(item.Vehicle_Count)
seriesDataRevenue.push(Number((item.RevenueAmount / 10000).toFixed(2))) seriesDataRevenue.push(Number((item.RevenueAmount / 10000).toFixed(2)))
realDataRevenue.push(item.RevenueAmount) realDataRevenue.push(item.RevenueAmount)
aiObj[`${item.Statistics_Month < 10 ? '0' + item.Statistics_Month : item.Statistics_Month}月入区车流`] = item.Vehicle_Count + '辆'
aiRevenueObj[`${item.Statistics_Month < 10 ? '0' + item.Statistics_Month : item.Statistics_Month}月对客营收`] = item.RevenueAmount + '元'
}) })
} }
@ -385,12 +392,18 @@ const handleGetSectionFlowCount = async () => {
let yesRealDataCar: number[] = [] let yesRealDataCar: number[] = []
let yesRealDataRevenue: number[] = [] let yesRealDataRevenue: number[] = []
let yesAiObj: any = {}
let yesAiRevenueObj: any = {}
if (yesData && yesData.length > 0) { if (yesData && yesData.length > 0) {
yesData.forEach((item: any) => { yesData.forEach((item: any) => {
yesSeriesDataCar.push(Number((item.Vehicle_Count / 10000).toFixed(2))) yesSeriesDataCar.push(Number((item.Vehicle_Count / 10000).toFixed(2)))
yesSeriesDataRevenue.push(Number((item.RevenueAmount / 10000).toFixed(2))) yesSeriesDataRevenue.push(Number((item.RevenueAmount / 10000).toFixed(2)))
yesRealDataCar.push(item.Vehicle_Count) yesRealDataCar.push(item.Vehicle_Count)
yesRealDataRevenue.push(item.RevenueAmount) yesRealDataRevenue.push(item.RevenueAmount)
yesAiObj[`${item.Statistics_Month < 10 ? '0' + item.Statistics_Month : item.Statistics_Month}月入区车流`] = item.Vehicle_Count + '辆'
yesAiRevenueObj[`${item.Statistics_Month < 10 ? '0' + item.Statistics_Month : item.Statistics_Month}月对客营收`] = item.RevenueAmount + '元'
}) })
} }
@ -437,7 +450,21 @@ const handleGetSectionFlowCount = async () => {
console.log('fdshufahsudifhasdjkfh', res); console.log('fdshufahsudifhasdjkfh', res);
let VehiclesEnteringAI = sessionStorage.getItem('VehiclesEnteringAI')
if (VehiclesEnteringAI) { } else {
let res: any = {}
res[`${res.currentYear}年入区车流`] = aiObj
res[`${res.yesYear}年入区车流`] = yesAiObj
sessionStorage.setItem("VehiclesEntering2", JSON.stringify(res))
}
let VehiclesEnteringAI2 = sessionStorage.getItem('VehiclesEnteringAI2')
if (VehiclesEnteringAI2) { } else {
let res: any = {}
res[`${res.currentYear}年对客营收`] = aiRevenueObj
res[`${res.yesYear}年对客营收`] = yesAiRevenueObj
sessionStorage.setItem("VehiclesEntering2", JSON.stringify(res))
}
return res return res
} }

View File

@ -75,6 +75,7 @@ let FestivalOptions = [
{ label: '国庆', value: 8 }, { label: '国庆', value: 8 },
] ]
const iframeLoaded = ref<boolean>(false);
// //
let FestivalValue = ref<number>(5) let FestivalValue = ref<number>(5)
// //
@ -126,6 +127,20 @@ const handleClickAIBox = () => {
showDialogBox.value = !showDialogBox.value showDialogBox.value = !showDialogBox.value
} }
// iframe
const handleIframeLoad = () => {
iframeLoaded.value = true;
sendCacheToIframe();
}
const sendCacheToIframe = () => {
const iframe = document.querySelector('iframe');
if (iframe && iframe.contentWindow) {
const cacheData = localStorage.getItem('CoreBusinessData'); //
iframe.contentWindow.postMessage({ type: 'cacheData', data: cacheData }, '*'); //
}
};
// //
const handleSubmit = () => { const handleSubmit = () => {
@ -202,7 +217,7 @@ const handleStopPrint = () => {
@handleMapToChangeNotice="handleMapToChangeNotice" /> @handleMapToChangeNotice="handleMapToChangeNotice" />
</div> </div>
<div class="AIDialogBox" v-show="selectPageTab === 1 && showDialogBox"> <div class="AIDialogBox" v-show="selectPageTab === 1 && showDialogBox">
<div class="dialogBox"></div> <!-- <div class="dialogBox"></div>
<div class="inputBox"> <div class="inputBox">
<el-input class="searchText" placeholder="Hi,您好!请输入您想了解的内容..." v-model="searchText" <el-input class="searchText" placeholder="Hi,您好!请输入您想了解的内容..." v-model="searchText"
@keyup.enter="handleSubmit()" /> @keyup.enter="handleSubmit()" />
@ -210,7 +225,14 @@ const handleStopPrint = () => {
@click="handleStopPrint()" /> @click="handleStopPrint()" />
<img v-if="!isPrinting" class="searchIcon" src="../../assets/image/searchIconBlue.png" <img v-if="!isPrinting" class="searchIcon" src="../../assets/image/searchIconBlue.png"
@click="handleSubmit()" /> @click="handleSubmit()" />
</div> </div> -->
<!-- 线上地址 -->
<!-- <iframe src="http://saas.eshangtech.com/deepseek/?comeForm=YNMap" style="width: 100%;height: 100%;"
frameborder="0" @load="handleIframeLoad"></iframe> -->
<!-- 本地地址 -->
<iframe src="http://10.104.1.171:5174/deepseek/?comeForm=YNMap"
style="width: 100%;height: 100%;overflow: hidden;" frameborder="0"
@load="handleIframeLoad"></iframe>
</div> </div>