diff --git a/common/utils.js b/common/utils.js index 57370bc..7c3a9fa 100644 --- a/common/utils.js +++ b/common/utils.js @@ -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; + } + } + } + } + } + return list +} @@ -555,6 +583,7 @@ export default { // bMapToQQMap, playVideo, getMoney, + handleGetSortList, getMoneyNoDecimal, getThisMonthDateList, handleReduceAMonth diff --git a/pages/commercialBI/specialCase.vue b/pages/commercialBI/specialCase.vue index dca0086..adc129a 100644 --- a/pages/commercialBI/specialCase.vue +++ b/pages/commercialBI/specialCase.vue @@ -20,7 +20,7 @@ {{ `注: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }} 注: 前20个从今日零时起至今流量与月均同时段增幅情况 - +
{{showDay}} @@ -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) }) } diff --git a/pages/index/index.vue b/pages/index/index.vue index c3ffec8..c56e7f2 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -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 diff --git a/pages/nationalPage/components/qiun-data-charts/js_sdk/u-charts/config-ucharts.js b/pages/nationalPage/components/qiun-data-charts/js_sdk/u-charts/config-ucharts.js index a544698..7dd45bc 100644 --- a/pages/nationalPage/components/qiun-data-charts/js_sdk/u-charts/config-ucharts.js +++ b/pages/nationalPage/components/qiun-data-charts/js_sdk/u-charts/config-ucharts.js @@ -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 + '') + ''; diff --git a/pages/nationalPage/springTravel.vue b/pages/nationalPage/springTravel.vue index c216cd8..b343109 100644 --- a/pages/nationalPage/springTravel.vue +++ b/pages/nationalPage/springTravel.vue @@ -610,7 +610,7 @@ {{`${leaseDailyAdd || '-'}%`}}
- +
@@ -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 } diff --git a/pages/summaryOfPortraits/components/businessPortrait.vue b/pages/summaryOfPortraits/components/businessPortrait.vue index 585a3f0..e68ba2b 100644 --- a/pages/summaryOfPortraits/components/businessPortrait.vue +++ b/pages/summaryOfPortraits/components/businessPortrait.vue @@ -61,10 +61,13 @@

业态交易值占比

-
+
+
+ +

商超畅销品

@@ -594,6 +597,8 @@ export default { StatisticsDate:this.time, BusinessTradeIds:-1 } + this.businessTypeList = [] + return }else{ req = { ProvinceCode:'340000', diff --git a/pages/summaryOfPortraits/components/components/bussiness/businessFormat.vue b/pages/summaryOfPortraits/components/components/bussiness/businessFormat.vue index 744ebcf..48292ad 100644 --- a/pages/summaryOfPortraits/components/components/bussiness/businessFormat.vue +++ b/pages/summaryOfPortraits/components/components/bussiness/businessFormat.vue @@ -1,5 +1,6 @@