This commit is contained in:
ylj20011123 2026-02-06 16:51:47 +08:00
parent 949f467454
commit e91dbf7184

View File

@ -152,7 +152,7 @@
<view class="header"> <view class="header">
<!-- :style="{height:loadMore?`calc(${(776/750)*phoneWidth + 260}px)`:`calc(${(776/750)*phoneWidth - 10}px)`}"--> <!-- :style="{height:loadMore?`calc(${(776/750)*phoneWidth + 260}px)`:`calc(${(776/750)*phoneWidth - 10}px)`}"-->
<!-- 时间选择 --> <!-- 时间选择 -->
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px' }"> <div class="headerTop" v-if="!guideInfo.visible" :style="{ height: menu.bottom + 5 + 'px' }">
<!-- <view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">--> <!-- <view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">-->
<!-- <image class="dateIcon" :src="1<=selectMonth && selectMonth<=3?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/1stDateTime.svg':4<=selectMonth && selectMonth<=6?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/2stDateTime.svg':7<=selectMonth && selectMonth<=9?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/3stDateTime.svg':'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/4stDateTime.svg'"></image>--> <!-- <image class="dateIcon" :src="1<=selectMonth && selectMonth<=3?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/1stDateTime.svg':4<=selectMonth && selectMonth<=6?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/2stDateTime.svg':7<=selectMonth && selectMonth<=9?'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/3stDateTime.svg':'https://eshangtech.com/ShopICO/ahyd-BID/newIndex/4stDateTime.svg'"></image>-->
<!--&lt;!&ndash; <picker mode="date" :value="single" @change="bindDateChange" >&ndash;&gt;--> <!--&lt;!&ndash; <picker mode="date" :value="single" @change="bindDateChange" >&ndash;&gt;-->
@ -3918,7 +3918,29 @@
</uni-popup> </uni-popup>
<!-- 底部导航栏--> <!-- 底部导航栏-->
<Tabbar ref="tabbar" :page="page"></Tabbar> <Tabbar v-if="!guideInfo.visible" ref="tabbar" :page="page"></Tabbar>
<!-- 数智助手新功能引导层 -->
<view v-if="guideInfo.visible" class="guide-mask" @touchmove.stop.prevent>
<view class="guide-highlight" :style="{
top: guideInfo.top + 'px',
left: guideInfo.left + 'px',
width: guideInfo.width + 'px',
height: guideInfo.height + 'px'
}"></view>
<view class="guide-bubble" :style="{
top: (guideInfo.top + guideInfo.height + 20) + 'px',
left: (guideInfo.left + guideInfo.width / 2) + 'px'
}">
<div class="guide-bubble-content">
<text class="guide-title">数智助手</text>
<text class="guide-desc">您的春运动态播报专家为您实时呈现全省及区域经营动态车流预警与数据分析</text>
<view class="guide-btn-group">
<view class="guide-btn outline" @click.stop="handleCloseGuide">知道了</view>
<view class="guide-btn primary" @click.stop="handleGoToRobot">看一下</view>
</view>
</div>
</view>
</view>
</view> </view>
</template> </template>
@ -4262,6 +4284,14 @@ export default {
realBoxPageX: 0, // x realBoxPageX: 0, // x
realBoxPageY: 0, // y realBoxPageY: 0, // y
showAi: false,// showAi: false,//
guideInfo: {
visible: false,
top: 0,
left: 0,
width: 0,
height: 0
},
isScrollLock: false, //
}; };
}, },
watch: { watch: {
@ -4321,6 +4351,7 @@ export default {
] === 1 ] === 1
) { ) {
this.showAi = true; this.showAi = true;
// getData
} }
if (!this.isReturn) { if (!this.isReturn) {
@ -4340,9 +4371,7 @@ export default {
} }
uni.setStorageSync("festival", this.isShowFestival); uni.setStorageSync("festival", this.isShowFestival);
this.getData(this.option); await this.getData(this.option);
this.handleNoticeMonth();
this.handleNoticeYear();
} }
} }
}, },
@ -4546,6 +4575,7 @@ export default {
] === 1 ] === 1
) { ) {
this.showAi = true; this.showAi = true;
// getData
} }
@ -4553,7 +4583,7 @@ export default {
this.option = option; this.option = option;
// //
if (this.user.Membership_Id) { if (this.user.Membership_Id) {
this.getData(option); await this.getData(option);
} }
// //
// //
@ -4579,9 +4609,7 @@ export default {
// //
this.nearestService(); this.nearestService();
} }
// // getData
this.handleNoticeMonth();
this.handleNoticeYear();
// isSuccess true // isSuccess true
setTimeout(() => { setTimeout(() => {
@ -4609,9 +4637,9 @@ export default {
onUnload() { onUnload() {
this.$util.addUserBehavior(); this.$util.addUserBehavior();
}, },
onPullDownRefresh: function () { onPullDownRefresh: async function () {
if (!this.isReturn) { if (!this.isReturn) {
this.getData(this.option); await this.getData(this.option);
this.currentMoney = 0; this.currentMoney = 0;
if (new Date().getTime() < new Date("2024-05-03 00:00:00").getTime()) { if (new Date().getTime() < new Date("2024-05-03 00:00:00").getTime()) {
this.showAdvertisement = true; this.showAdvertisement = true;
@ -4621,6 +4649,9 @@ export default {
} }
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
onPageScroll(e) {
// scrollTop
},
methods: { methods: {
numeral, numeral,
...mapActions(["memberLogin", "getLoginCode"]), ...mapActions(["memberLogin", "getLoginCode"]),
@ -4902,7 +4933,10 @@ export default {
}, },
goToRobot() { goToRobot() {
this.$util.toNextRoute("navigateTo", `/pages/robot/index`); this.$util.toNextRoute("navigateTo", `/pages/robot/index`);
// this.$util.toNextRoute("navigateTo", `/pages/testPage/index`); },
handleGoToRobot() {
this.handleCloseGuide();
this.goToRobot();
}, },
goToBillLading() { goToBillLading() {
this.$util.toNextRoute("navigateTo", `/pages/billOfLading/index`); this.$util.toNextRoute("navigateTo", `/pages/billOfLading/index`);
@ -4993,9 +5027,11 @@ export default {
"CommercialApi/Analysis/GetANALYSISINSList", "CommercialApi/Analysis/GetANALYSISINSList",
req req
); );
if (data && data.Result_Data && data.Result_Data.List) {
this.monthNoticeText = data.Result_Data.List[0] this.monthNoticeText = data.Result_Data.List[0]
? data.Result_Data.List[0].ANALYSIS_CONTENT ? data.Result_Data.List[0].ANALYSIS_CONTENT
: ""; : "";
}
}, },
async handleNoticeYear() { async handleNoticeYear() {
let date = new Date(this.lastDay); let date = new Date(this.lastDay);
@ -5018,8 +5054,10 @@ export default {
"CommercialApi/Analysis/GetANALYSISINSList", "CommercialApi/Analysis/GetANALYSISINSList",
reqYear reqYear
); );
if (totalData.Result_Data.List[0]) { if (totalData && totalData.Result_Data && totalData.Result_Data.List) {
this.yearNoticeText = totalData.Result_Data.List[0].ANALYSIS_CONTENT; this.yearNoticeText = totalData.Result_Data.List[0]
? totalData.Result_Data.List[0].ANALYSIS_CONTENT
: "";
} }
}, },
async nearestService() { async nearestService() {
@ -5135,13 +5173,17 @@ export default {
} }
}, },
// option type // option type
getData(option, type) { async getData(option, type) {
// //
if (this.user.Membership_Id) { if (this.user.Membership_Id) {
uni.showLoading({ uni.showLoading({
title: "正在加载...", title: "正在加载...",
}); });
} }
this.isSuccess = false;
const promises = [];
// //
if (option.ProvinceCode) { if (option.ProvinceCode) {
// //
@ -5152,69 +5194,47 @@ export default {
this.lastDay = this.$util.cutDate(option.time, "YYYY-MM-DD"); this.lastDay = this.$util.cutDate(option.time, "YYYY-MM-DD");
// //
this.single = timestampToTimeMonth(new Date(this.lastDay).getTime()); this.single = timestampToTimeMonth(new Date(this.lastDay).getTime());
// //
// const date = new Date(this.lastDay)
// this.thisDay = getThisDay(date.getDay())
} }
// //
this.initData(); this.initData();
//
this.initYesterdayData(type, "first"); promises.push(this.initYesterdayData(type, "first"));
// promises.push(this.handleGetWarningList());
// this.getCarInfo() promises.push(this.handleGetAllCarTraffic());
// promises.push(this.handleRealRevenue());
// this.monthYearPlan() promises.push(this.getDetail(this.theRequest));
// //
this.handleGetWarningList(); promises.push(this.handleNoticeMonth());
// promises.push(this.handleNoticeYear());
// this.handleGetExamine()
//
// this.handleGetDailyPatrol()
//
this.handleGetAllCarTraffic();
//
// this.handleGetNationalData()
//
this.handleRealRevenue();
} else if (this.user.Membership_Id) { } else if (this.user.Membership_Id) {
//
//
// if (!this.PushAuthority){return}
// if (this.PushAuthority.length > 0) {
// initData
this.theRequest = this.defaultMsg() || {}; this.theRequest = this.defaultMsg() || {};
this.theRequest.time = this.lastDay; this.theRequest.time = this.lastDay;
this.theRequest.month = this.$util.cutDate(this.lastDay, "YYYYMM"); this.theRequest.month = this.$util.cutDate(this.lastDay, "YYYYMM");
// initDatatrue
this.initData(); this.initData();
//
this.initYesterdayData(type, "first"); promises.push(this.initYesterdayData(type, "first"));
// promises.push(this.handleGetWarningList());
// this.getCarInfo() promises.push(this.handleGetAllCarTraffic());
// promises.push(this.handleRealRevenue());
// this.monthYearPlan() promises.push(this.getDetail(this.theRequest));
// //
this.handleGetWarningList(); promises.push(this.handleNoticeMonth());
// promises.push(this.handleNoticeYear());
// this.handleGetExamine() }
//
// this.handleGetDailyPatrol() //
// try {
this.handleGetAllCarTraffic(); await Promise.all(promises);
// } catch (err) {
// this.handleGetNationalData() console.error('部分数据加载失败', err);
//
this.handleRealRevenue();
} }
// //
this.nowTab = this.theRequest.ProvinceCode == 340000 ? 1 : 2; this.nowTab = this.theRequest.ProvinceCode == 340000 ? 1 : 2;
if (this.theRequest.GroupType == 1010) {
this.getDetail(this.theRequest);
}
// //
if (this.theRequest.ProvinceCode == 620000) { if (this.theRequest.ProvinceCode == 620000) {
this.getRankContent(); await this.getRankContent();
} }
}, },
// //
@ -5223,10 +5243,9 @@ export default {
pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000", pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
StatisticsDate: this.nowDay, StatisticsDate: this.nowDay,
}; };
request return request
.$webGet("CommercialApi/Revenue/GetCurRevenue", req) .$webGet("CommercialApi/Revenue/GetCurRevenue", req)
.then((res) => { .then((res) => {
// this.currentMoney = this.$util.fmoney(res.Result_Data.CurRevenueAmount,2)
this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2); this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2);
}); });
}, },
@ -5260,7 +5279,7 @@ export default {
ShowCount: 20, ShowCount: 20,
}; };
request return request
.$webGet("CommercialApi/BigData/GetBayonetWarning", req) .$webGet("CommercialApi/BigData/GetBayonetWarning", req)
.then((res) => { .then((res) => {
if (res.Result_Data.List && res.Result_Data.List.length > 0) { if (res.Result_Data.List && res.Result_Data.List.length > 0) {
@ -5314,7 +5333,7 @@ export default {
} }
console.log('fjdjafjsa', req); console.log('fjdjafjsa', req);
request.$webGet('CommercialApi/BigData/GetHolidayBayonetWarning', req).then((res) => { return request.$webGet('CommercialApi/BigData/GetHolidayBayonetWarning', req).then((res) => {
const list = res.Result_Data.List || []; const list = res.Result_Data.List || [];
if (list.length > 0) { if (list.length > 0) {
this.special = true; this.special = true;
@ -5415,10 +5434,67 @@ export default {
} }
}, },
// //
onRefresh(type) { initAiGuide() {
if (!this.showAi || this.guideInfo.visible || uni.getStorageSync('has_ai_guide_shown_v1')) return;
if (!this.isSuccess) return;
console.log('触发数智助手引导定位...');
const query = uni.createSelectorQuery().in(this);
query.select('.szzs').boundingClientRect();
query.selectViewport().scrollOffset();
query.exec(res => {
const element = res[0];
const viewport = res[1];
if (element && element.top > 0) {
const absoluteTop = element.top + viewport.scrollTop;
console.log('布局定位点高度:', absoluteTop);
uni.pageScrollTo({
scrollTop: absoluteTop - 250,
duration: 500,
success: () => {
setTimeout(() => {
this.calculateSzzsPosition();
}, 600);
}
});
} else {
//
setTimeout(() => {
if (this.isSuccess) this.initAiGuide();
}, 300);
}
});
},
//
calculateSzzsPosition() {
const query = uni.createSelectorQuery().in(this);
query.select('.szzs').boundingClientRect(rect => {
if (rect) {
console.log('滚动后获取坐标:', rect);
this.guideInfo.top = rect.top;
this.guideInfo.left = rect.left;
this.guideInfo.width = rect.width;
this.guideInfo.height = rect.height;
this.isScrollLock = true; //
this.guideInfo.visible = true; //
}
}).exec();
},
//
handleCloseGuide() {
this.guideInfo.visible = false;
this.isScrollLock = false;
uni.setStorageSync('has_ai_guide_shown_v1', true);
},
async onRefresh(type) {
// //
if (!this.isReturn) { if (!this.isReturn) {
this.getData(this.option, type); await this.getData(this.option, type);
} }
}, },
getUnUpLoadList() { getUnUpLoadList() {
@ -5781,7 +5857,7 @@ export default {
uni.showLoading({ uni.showLoading({
title: "正在加载...", title: "正在加载...",
}); });
request return request
.$webGet("CommercialApi/Revenue/GetSummaryRevenueMonth", req) .$webGet("CommercialApi/Revenue/GetSummaryRevenueMonth", req)
.then((lastData) => { .then((lastData) => {
flag3 = true; flag3 = true;
@ -5985,32 +6061,6 @@ export default {
this.todayAmount(); this.todayAmount();
} }
}); });
// const lastData = await request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData)
// flag3 = true
// let result = lastData.Result_Data
// //
// for(let key in result){
// if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount' && key!=='YearRevenueAmount'){
// let all = 0
// //
// result[key].forEach(item=>{
// all += Number(item.value)
// })
// //
// result[key].map(item=>{
// item.percentage = ((Number(item.value)/all)*100).toFixed(2)
// })
// //
// result[key].forEach(item=>{
// item.value = _this.$util.fmoney(item.value)
// })
// }
// }
// this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount)
// this.yearAmountAdd = result.YearRevenueAmount?this.$util.fmoney(result.YearRevenueAmount):'-'
// this.modelProgress = result.BusinessTypeList
//
}, },
// //
handleGetAllCarTraffic() { handleGetAllCarTraffic() {
@ -6031,7 +6081,7 @@ export default {
Province_Code: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000", Province_Code: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
Statistics_Date: time, Statistics_Date: time,
}; };
request return request
.$webGet("CommercialApi/Revenue/GetProvinceAvgBayonetAnalysis", req) .$webGet("CommercialApi/Revenue/GetProvinceAvgBayonetAnalysis", req)
.then((res) => { .then((res) => {
res.Result_Data.List.forEach((item) => { res.Result_Data.List.forEach((item) => {
@ -6180,7 +6230,7 @@ export default {
// title: `${endMonth}.${endDay+1},`, // title: `${endMonth}.${endDay+1},`,
// // title: `${startMonth}.${startDay}-${endMonth}.${endDay},`, // // title: `${startMonth}.${startDay}-${endMonth}.${endDay},`,
// icon:'none', // icon:'none',
// showCancel: fainitYesterdayDatalse, // showCancel: false,
// duration:3000 // duration:3000
// }); // });
} }
@ -6252,10 +6302,50 @@ export default {
this.stopSwiper = false; this.stopSwiper = false;
_this.$forceUpdate(); _this.$forceUpdate();
//
this.$nextTick(() => {
this.initAiGuide();
});
},
getListDetail(data) {
let arr = []
let keyJson = {
SHOWMORE_SIGN: {
1: '【长款】',
2: '【异常长款】'
}, //
SHOWLESS_SIGN: {
1: '【短款】',
2: '【异常短款】'
}, //
SHOWABNORMAL_SIGN: {
1: '【异常校验】'
}, //
SHOWSCAN_SIGN: {
1: '【扫】'
}, //
SHOWSSUPPLY_SIGN: {
1: '【补】'
}, //
SHOWCHECK_SIGN: {
1: '【稽核检查】'
}, //
INTERFACE_SIGN: {
1: '【接口传输】'
}, //
}
var keyCode = ['SHOWABNORMAL_SIGN', 'SHOWCHECK_SIGN', 'SHOWMORE_SIGN', 'SHOWLESS_SIGN', 'SHOWSCAN_SIGN',
'SHOWSSUPPLY_SIGN', 'INTERFACE_SIGN'
]
keyCode.map(n => {
if (keyJson[n][data[n]]) arr.push(keyJson[n][data[n]])
})
return arr
}, },
getDetail(obj) { getDetail(obj) {
let _this = this; let _this = this;
this.$request return this.$request
.$webGet("CommercialApi/Revenue/GetServerpartEndAccountList", { .$webGet("CommercialApi/Revenue/GetServerpartEndAccountList", {
Serverpart_ID: obj.ServerpartIds, Serverpart_ID: obj.ServerpartIds,
pushProvinceCode: obj.ProvinceCode, pushProvinceCode: obj.ProvinceCode,
@ -11065,4 +11155,116 @@ $iphoneHeight: env(safe-area-inset-bottom);
} }
} }
} }
/* 数智助手新功能引导样式 */
.guide-mask {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 99999;
background-color: transparent;
}
.guide-highlight {
position: absolute;
border-radius: 12rpx;
box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.7);
transition: all 0.3s;
pointer-events: none;
}
.guide-highlight::after {
content: '';
position: absolute;
top: -4px;
left: -4px;
right: -4px;
bottom: -4px;
border: 2px solid #1677FE;
border-radius: 16rpx;
animation: guide-pulse 1.5s infinite;
}
@keyframes guide-pulse {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(1.1);
}
}
.guide-bubble {
position: absolute;
transform: translateX(-50%);
width: 500rpx;
z-index: 10001;
pointer-events: auto;
}
.guide-bubble-content {
background: rgba(30, 30, 30, 0.9);
backdrop-filter: blur(10px);
padding: 30rpx;
border-radius: 20rpx;
color: #fff;
position: relative;
}
.guide-bubble-content::before {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: 15rpx solid transparent;
border-bottom-color: rgba(30, 30, 30, 0.9);
}
.guide-title {
display: block;
font-size: 32rpx;
font-weight: bold;
color: #1677FE;
margin-bottom: 15rpx;
}
.guide-desc {
display: block;
font-size: 26rpx;
line-height: 1.5;
margin-bottom: 30rpx;
color: #e0e0e0;
}
.guide-btn-group {
display: flex;
justify-content: space-between;
gap: 20rpx;
}
.guide-btn {
flex: 1;
text-align: center;
padding: 15rpx 0;
border-radius: 40rpx;
font-size: 26rpx;
font-weight: 500;
transition: all 0.2s;
}
.guide-btn.outline {
border: 1px solid #1677FE;
color: #1677FE;
}
.guide-btn.primary {
background: #1677FE;
color: #ffffff;
}
</style> </style>