This commit is contained in:
cclu 2024-02-20 18:30:57 +08:00
parent 23fb9a310a
commit 8fcf510dbc
12 changed files with 126 additions and 41 deletions

View File

@ -90,7 +90,7 @@ const cutDate = (dd, type, daynum) => {
var s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
return type.replace('YYYY', y).replace('MM', m).replace('DD', d).replace('hh', h).replace('mm', mi).replace('ss', s)
}
// 金额格式化处理方法
// 四舍五入的保留两位小数的 金额化数字方法
const fmoney = (s, n) => {
/*
* 参数说明
@ -118,7 +118,7 @@ const fmoney = (s, n) => {
}
// 没有小数点的金额格式化
// 四舍五入不保留小数的 金额化数字方法
function noDecimal(s){
console.log('s',s)
let fuhao = ''; //如果数字小于零则值为-
@ -487,7 +487,7 @@ function handleReduceAMonth(nowTime,newTime){
}
}
}
// 不四舍五入 保留两位小数的金额化方法
function getMoney(money){
if (!money || isNaN(money)) return "0.00";
let num = parseFloat(money + '') + '';
@ -511,7 +511,7 @@ function getMoney(money){
return num;
}
// 不四舍五入 不保留两位小数的金额化方法
function getMoneyNoDecimal(money){
if (!money || isNaN(money)) return "0";
let num = parseFloat(money + '') + '';
@ -531,7 +531,35 @@ function getMoneyNoDecimal(money){
}
return num;
}
// 封装的排序数组的方法
// list 为排序的数组 field 为按照那个字段排序 type 正序还是倒序 1正 2倒
const handleGetSortList = (list,field,type)=>{
if (list && list.length>0){
let len = list.length
if (type===2){
for (var i = 0; i < len - 1;i++){
for (var j = 0; j < len - 1 - i; j++) {
if (list[i][field]<list[j][field]){
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
}
}
}else{
for (var i = 0; i < len - 1;i++){
for (var j = 0; j < len - 1 - i; j++) {
if (list[i][field]>list[j][field]){
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
}
}
}
}
return list
}
@ -555,6 +583,7 @@ export default {
// bMapToQQMap,
playVideo,
getMoney,
handleGetSortList,
getMoneyNoDecimal,
getThisMonthDateList,
handleReduceAMonth

View File

@ -20,7 +20,7 @@
<!-- : 1个小时入区流量比5月同一时间流量增幅150%以上且每小时入区车辆超过100辆-->
<span class="notice" v-if="selectTab===1">{{ `: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }}</span>
<span class="notice" v-if="selectTab===2">: 前20个从今日零时起至今流量与月均同时段增幅情况</span>
</div>
</div>
<div class="boxRight">
<span class="day">{{showDay}}</span>
<img class="dayBox" src="https://eshangtech.com/ShopICO/ahyd-BID/newCommercial/dateBg.png"/>
@ -149,7 +149,6 @@ export default {
this.seat = uni.getStorageSync('seatInfo')
let _this = this
console.log('this.seat11',this.seat)
if (this.seat){
//stroge
wx.getFuzzyLocation({
@ -214,7 +213,6 @@ export default {
ServerpartId:item.SERVERPART_ID
}
const total = await request.$webGet('CommercialApi/BaseInfo/GetServerpartInfo',req)
console.log('total',total)
uni.navigateTo({
url:`/pages/commercialBI/map?longitude=${total.Result_Data.ServerpartInfo?total.Result_Data.ServerpartInfo.SERVERPART_X:''}&latitude=${total.Result_Data.ServerpartInfo?total.Result_Data.ServerpartInfo.SERVERPART_Y:''}&id=${item.SERVERPART_ID}`
})
@ -250,7 +248,6 @@ export default {
this.tableList = this.handleList(res.Result_Data.List,this.serviceList)
this.tableList = this.handleSortList(this.tableList)
uni.hideLoading()
console.log('this.tableList',this.tableList)
})
}else if(val === 1 ){
const req= {
@ -266,7 +263,6 @@ export default {
this.tableList = this.handleList(res.Result_Data.List,this.serviceList)
this.tableList = this.handleSortList(this.tableList)
uni.hideLoading()
console.log('this.tableList',this.tableList)
})
}

View File

@ -1302,6 +1302,7 @@ import RateCharts from "./components/rateCharts.vue";
import SliderPage from "./components/sliderPage.vue";
import UniDataSelect from "../../components/uni-data-select/uni-data-select.vue";
import NumberScroll from "./components/numberScroll.vue";
import moment from "moment";
var rincanvas = {};
export default {
components: {SliderPage, RateCharts, MonthCharts, Tabbar,uniPopup,UniDataSelect,NumberScroll},
@ -2046,7 +2047,8 @@ export default {
handleGetWarningList(){
const date = new Date()
//
let h = date.getHours() - 1
// let h = 24
let h = date.getHours()
let y = date.getFullYear()
let m = date.getMonth() + 1
if (m<10){
@ -2056,13 +2058,15 @@ export default {
if (d<10){
d = '0'+d
}
const req= {
// this.single
StatisticsDate: `${y}-${m}-${d}`,
StatisticsHour:h,
StatisticsDate: h===0 || h===24?moment(`${y}-${m}-${d}`).subtract(1, 'day').format('YYYY-MM-DD'):`${y}-${m}-${d}`,
StatisticsHour:h===0 || h===24?23:h - 1,
StatisticsType:1,
ShowCount:20
}
console.log('12312312req',req)
request.$webGet('CommercialApi/BigData/GetBayonetWarning',req).then(res=>{
if (res.Result_Data.List && res.Result_Data.List.length>0){
this.special = true

View File

@ -19,6 +19,7 @@
// 主题颜色配置如每个图表类型需要不同主题请在对应图表类型上更改color属性
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
// 四舍五入的保留两位小数的 金额化数字方法
const fmoney = (s, n) => {
/*
* 参数说明
@ -44,7 +45,7 @@ const fmoney = (s, n) => {
return fuhao + [...t].reverse().join("") + "." + r;
}
}
// 四舍五入不保留小数的 金额化数字方法
const noDecimal = (s) =>{
let fuhao = ''; //如果数字小于零则值为-
if (s < 0) {
@ -59,7 +60,7 @@ const noDecimal = (s) =>{
}
return fuhao + [...t].reverse().join("")
}
// 不四舍五入 保留两位小数的金额化方法
const getMoney = (money)=>{
if (!money || isNaN(money)) return "0.00";
let num = parseFloat(money + '') + '';
@ -83,7 +84,7 @@ const getMoney = (money)=>{
return num;
}
// 不四舍五入 不保留两位小数的金额化方法
const getMoneyNoDecimal = (money)=>{
if (!money || isNaN(money)) return "0";
let num = parseFloat(money + '') + '';

View File

@ -610,7 +610,7 @@
<span :style="{color:leaseDailyAdd>0?'#E83944':leaseDailyAdd<0?'#0E9976':''}">{{`${leaseDailyAdd || '-'}%`}}</span>
</div>
</div>
</div>
</div>
<div class="typeSecond" v-if="pageType===2">
<div class="listValueBox">
@ -1001,7 +1001,11 @@ export default {
if (i<7){
dateList.push({label:`${i}`,value:`2024-01-${26+i-1}`})
}else{
dateList.push({label:`${i}`,value:`2024-02-${i - 7 + 1<10?`0${i - 7 + 1}`:i - 7 + 1}`})
if (i-6>29){
}else{
dateList.push({label:`${i}`,value:`2024-02-${i - 7 + 1<10?`0${i - 7 + 1}`:i - 7 + 1}`})
}
}
}
this.scrollList = dateList
@ -1404,8 +1408,6 @@ export default {
//
async handleGetNewUpdateTime(){
const data = await request.$webGet('CommercialApi/Revenue/GetLastSyncDateTime')
console.log('1111',data)
console.log('this',this.lastDay)
if (this.lastDay === data.Result_Data){
this.isShowWarningTime = false
}

View File

@ -61,10 +61,13 @@
</div>
<div class="chartsItem" style="height:280px;margin-top: 32px">
<p class="title">业态交易值占比</p>
<div>
<div v-if="businessTypeList && businessTypeList.length>0">
<business-format :data="businessTypeList"/>
<analyse :analyseInfo="{analysisins_type: 1405,analysisins_format: 2000}" />
</div>
<div v-else>
<no-data :height="'280'"/>
</div>
</div>
<div class="chartsItem" style="height:420px;margin-top: 32px">
<p class="title">商超畅销品</p>
@ -594,6 +597,8 @@ export default {
StatisticsDate:this.time,
BusinessTradeIds:-1
}
this.businessTypeList = []
return
}else{
req = {
ProvinceCode:'340000',

View File

@ -1,5 +1,6 @@
<template>
<div class="businessFormat">
<div>
<div class="businessFormat" v-if="isShow">
<QiunDataCharts
type="ring"
:opts="opts"
@ -9,9 +10,11 @@
:canvas2d="true"
tooltipFormat="businessFormat"
/>
<!-- <canvas class="format" style="width: 100vw;height: 260px;position: fixed;left: 100%" canvas-id="businessFormat" id="businessFormat" @tap="tap"/>-->
<!-- <image style="width: 100vw;height: 260px" v-if="formatPath" class="format" :src="formatPath"></image>-->
<!-- <canvas class="format" style="width: 100vw;height: 260px;position: fixed;left: 100%" canvas-id="businessFormat" id="businessFormat" @tap="tap"/>-->
<!-- <image style="width: 100vw;height: 260px" v-if="formatPath" class="format" :src="formatPath"></image>-->
</div>
</div>
</template>
<script>
@ -20,13 +23,13 @@ import QiunDataCharts from "../qiun-data-charts/components/qiun-data-charts/qiun
var uChartsInstance = {};
export default {
name: "businessFormat",
components: {QiunDataCharts},
components: {QiunDataCharts},
data() {
return {
width:0,
formatPath:'',
opts:{},
res:{}
res:{},
}
},
props: {
@ -38,11 +41,15 @@ export default {
watch: {
data: {
handler(value) {
this.handleCarData(value)
console.log('value1232132',value)
this.handleCarData(value)
},
immediate: true
}
},
onShow(){
console.log('data',this.data)
},
methods: {
tap(e){
uChartsInstance[e.target.id].showToolTip(e, {
@ -54,7 +61,7 @@ export default {
},
//
handleCarData(value) {
let res = value
let res = value
this.res = res
this.opts = {
series: res.series,
@ -181,4 +188,25 @@ export default {
height: 260px;
}
}
.noData{
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 12px;
padding: 16px 0;
.img{
width:60px;
height: 60px;
margin-bottom: 8px;
}
.text{
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6C737A;
line-height: 20rpx;
}
}
</style>

View File

@ -9,7 +9,7 @@
<div class="bottom">
<div class="item">
<div class="top">
<p class="price">{{ info.TicketCount?info.TicketCount:'-' }}</p>
<p class="price">{{ info.TicketCount?$util.getMoneyNoDecimal(info.TicketCount):'-' }}</p>
<view class="right" v-if="info.TicketCount">
<image class="arrowTop" :src="Number((info.TicketCount / info.TicketAvgCount)-1)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text class="text">{{orderTransaction+'%'}}</text>
@ -29,7 +29,7 @@
</div>
<div class="item">
<div class="top">
<p class="price">{{ info.VehicleCount?info.VehicleCount:'-' }}</p>
<p class="price">{{ info.VehicleCount?$util.getMoneyNoDecimal(info.VehicleCount):'-' }}</p>
<view class="right" v-if="addAreaCarNumber">
<image class="arrowTop" :src="((info.VehicleCount / info.MonthVehicleCount)-1)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text class="text">{{addAreaCarNumber ? addAreaCarNumber + '%':'-' + '%'}}</text>
@ -56,7 +56,7 @@
</div>
<div class="bottom">
<div class="item">
<p class="price">{{ info.TicketAvgCount?info.TicketAvgCount:'-' }}</p>
<p class="price">{{ info.TicketAvgCount?$util.getMoneyNoDecimal(info.TicketAvgCount):'-' }}</p>
<p class="text">客单交易 <text class="unit">/</text></p>
</div>
<div class="item">
@ -64,7 +64,7 @@
<p class="text">客单均价 <text class="unit">/</text></p>
</div>
<div class="item">
<p class="price">{{ info.MonthVehicleCount?info.MonthVehicleCount:'-' }}</p>
<p class="price">{{ info.MonthVehicleCount?$util.getMoneyNoDecimal(info.MonthVehicleCount):'-' }}</p>
<p class="text">入区车辆 <text class="unit">/</text></p>
</div>
<div class="item">

View File

@ -1,5 +1,5 @@
<template>
<div class="main">
<div class="main" :style="{height: height?height+'px':''}">
<image :class="type==='index'?'typeImg':'img'" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image>
<p class="text" v-if="type!=='car'">抱歉,数据为第三方接口传输无法进行画像分析</p>
<p class="text" v-else>抱歉,第三方数据未传,无法分析</p>
@ -17,6 +17,10 @@ export default {
type:{
type:String,
default:''
},
height:{
type:String,
default:''
}
},
onLoad(query){

View File

@ -368,11 +368,20 @@ export default {
woman:'',
res:[]
}
const req = {
let req
if (this.serviceInfo.SERVERPART_NAME==='安徽驿达'){
req = {
statisticsType:1,
provinceCode:'340000',
serverpartId:this.serviceInfo.SERVERPART_NAME==='安徽驿达'?null:this.serviceInfo.Serverpart_ID,
statisticsMonth:this.$util.getThisMonth(time)
}
}else{
req = {
statisticsType:1,
provinceCode:'340000',
serverpartId:this.serviceInfo.Serverpart_ID,
statisticsMonth:this.$util.getThisMonth(time)
}
}
let totalData = await request.$webGet('CommercialApi/Customer/GetCustomerRatio',req)
totalData.Result_Data.List.forEach(item=>{
@ -401,6 +410,7 @@ export default {
// data: [[25,35,17],[35,15,15]]
// }
// ]
console.log('result',result)
this.genderBubbleList = result
},
//

View File

@ -923,10 +923,14 @@ export default {
}
},
previewImage(event,index){
this.isHandleOnShow = false
//
wx.previewImage({
current: event.currentTarget.dataset.src[index], // http
urls: event.currentTarget.dataset.src // http
urls: event.currentTarget.dataset.src, // http
success:function (res) {
console.log('res',res)
}
})
},
//

View File

@ -61,7 +61,7 @@
</swiper-item>
<!-- 考评考核 6-->
<swiper-item class="swiperItem">
<newAmine :selectIndex="selectPortrait" :pageType="1"/>
<newAmine :selectIndex="selectPortrait" :pageType="1" />
</swiper-item>
<!-- 日常巡检 7-->
<swiper-item class="swiperItem">
@ -89,6 +89,7 @@ export default {
isShowSwiper:false,//
menu:{},
serviceInfo:{},//
isHandleOnShow: true,// onShow
}
},
onLoad(query){
@ -101,10 +102,10 @@ export default {
},
onShow(){
console.log('onShow')
this.isShowSwiper = true
let seat = uni.getStorageSync('currentService')
this.serviceInfo = seat
console.log('onShow')
this.isShowSwiper = true
let seat = uni.getStorageSync('currentService')
this.serviceInfo = seat
},
onHide(){
this.isShowSwiper = false
@ -113,6 +114,7 @@ export default {
//
handleChangeSelect(e){
console.log('e',e)
this.handleChangePreview(true)
this.selectPortrait = e.detail.current
},
//