This commit is contained in:
cclu 2023-08-09 18:59:14 +08:00
parent 40faac6de8
commit 9f3bba9608
19 changed files with 2910 additions and 2390 deletions

View File

@ -18,7 +18,8 @@
<div class="boxLeft" style="width: 100%">
<div class="headerTitle">实时分析</div>
<!-- : 1个小时入区流量比5月同一时间流量增幅150%以上且每小时入区车辆超过100辆-->
<span class="notice"></span>
<span class="notice" v-if="selectTab===1">{{ `: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }}</span>
<span class="notice" v-if="selectTab===2">: 前20个从今日零时起至今流量与月均同时段增幅情况</span>
</div>
<div class="boxRight">
<span class="day">{{showDay}}</span>
@ -32,10 +33,9 @@
<div :class="selectTab===1?'selectTab tabItem':'tabItem'" @click="handleTab(1)">{{`${startTime}时入区车流预警`}}</div>
<div :class="selectTab===2?'selectTab tabItem':'tabItem'" @click="handleTab(2)">{{endTime===24?`${endTime - 1}-0时入区车流排行`:`0-${startTime}时入区车流排行`}}</div>
</div>
<div class="noticeBox">
<span class="notice" v-if="selectTab===1">{{ `: 1个小时入区流量比${showMonth}月同一时间流量增幅150%以上且每小时入区车辆超过100辆` }}</span>
<span class="notice" v-if="selectTab===2">: 前20个从今日零时起至今流量与月均同时段增幅情况</span>
</div>
<!-- <div class="noticeBox">-->
<!-- </div>-->
<div class="contentList" v-if="selectTab===1">
<div class="contentItem" :style="{borderBottom:index + 1===tableList.length?'0px solid #EEEEEE':'1px solid #EEEEEE'}" v-for="(item,index) in tableList" :key="index">

View File

@ -406,7 +406,7 @@
width: 100%;
box-sizing: border-box;
transition: all .2s;
background: url(../../static/images/effective/bg-top.png) no-repeat center;
background: url('https://eshangtech.com/ShopICO/ahyd-BID/effective/bg-top.png') no-repeat center;
background-size: contain;
background-repeat: no-repeat;
background-position: top center;

View File

@ -740,7 +740,7 @@ export default {
}
.new-content {
background: url('/static/images/revenue/banner.png') no-repeat bottom left;
background: url('https://eshangtech.com/ShopICO/ahyd-BID/revenue/banner.png') no-repeat bottom left;
height: 383rpx;
background-size: 100%;
color: #fff;

View File

@ -894,7 +894,7 @@
width: 100%;
box-sizing: border-box;
transition: all .2s;
background: url(../../static/images/effective/bg-top.png) no-repeat center;
background: url('https://eshangtech.com/ShopICO/ahyd-BID/effective/bg-top.png') no-repeat center;
background-size: contain;
background-repeat: no-repeat;
background-position: top center;

View File

@ -172,7 +172,7 @@
width: 100%;
box-sizing: border-box;
transition: all .2s;
background: url(/static/images/effective/bg-top.png) no-repeat center;
background: url('https://eshangtech.com/ShopICO/ahyd-BID/effective/bg-top.png') no-repeat center;
background-repeat: no-repeat;
background-position: top center;

File diff suppressed because one or more lines are too long

View File

@ -921,7 +921,7 @@
width: 100%;
box-sizing: border-box;
transition: all .2s;
background: url(../../static/images/effective/bg-top.png) no-repeat center;
background: url('https://eshangtech.com/ShopICO/ahyd-BID/effective/bg-top.png') no-repeat center;
background-size: contain;
background-repeat: no-repeat;
background-position: top center;

View File

@ -369,10 +369,18 @@ export default {
come:'',//
examineList:[],
showImgUrl:{},//
queryTime:'',//
}
},
onLoad(query){
console.log('query',query)
this.come = query.come
if (query.type){
this.selectTab = Number(query.type)
}
if (query.time){
this.queryTime = query.time
}
//
let systemInfo = uni.getSystemInfoSync()
this.windowHeight = systemInfo.windowHeight
@ -393,10 +401,9 @@ export default {
})
this.monthList = list
//
this.dateList = this.$util.getThisMonthDateList(date)
// this.dateList = this.$util.getThisMonthDateList(date)
console.log('this.dateList',this.dateList)
//
this.getAreaList()
},
onReady(){
//
@ -409,7 +416,7 @@ export default {
},
//
getThisMonth(){
const date = new Date()
const date = this.queryTime ? new Date(this.queryTime): new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
if (month<10){
@ -427,9 +434,21 @@ export default {
if (day<10){
day = '0' + day
}
const realDate = new Date(this.lastDay)
let realMonth = realDate.getMonth() + 1
if (realMonth>month){
// let d = this.$util.getThisMonthDay(`${year}-${month}`)
this.selectDate = `${year}-${month}-01`
this.dateList = this.$util.getThisMonthDateList(`${year}-${month}`)
this.currentDate = 'item'+`${year}-${month}-01`
}else{
this.selectDate = `${year}-${month}-${day}`
this.dateList = this.$util.getThisMonthDateList(`${year}-${month}`)
}
console.log('this.selectDate',this.selectDate)
this.currentDate = 'item'+`${year}-${month}-${showDay}`
//
this.getAreaList(`${year}-${month}-${day}`)
},
//
handleShowPopup(value,obj){
@ -493,7 +512,7 @@ export default {
}
},
changeDetail(subItem){
this.showImgUrl=subItem
this.showImgUrl = subItem
this.$forceUpdate()
},
previewImage(event,subItem){
@ -653,7 +672,7 @@ export default {
this.popupServiceShowList = this.popupServiceList[this.popupTabSelect]
},
//
async getAreaList(){
async getAreaList(date){
const total = await request.$webGet(`CommercialApi/BaseInfo/GetSPRegionList`,{Province_Code:Store.state.userData.ProvinceCode})
uni.hideLoading()
if (total.Result_Code===100){
@ -667,7 +686,13 @@ export default {
this.selectAreaName = this.areaList[0].label
// selectAreaValue
//
this.getManagerList()
if (this.selectTab===1){
//
this.getManagerList(date)
}else if(this.selectTab===2){
//
this.getDailyInspectionList()
}
}
},
//
@ -693,22 +718,39 @@ export default {
this.hidePopup()
},
//
async getManagerList(){
async getManagerList(time){
console.log('time123',time)
uni.showLoading({
title: '正在加载...'
})
const date = new Date(this.searchTime)
const realDate = new Date(this.lastDay)
let realMonth = realDate.getMonth() + 1
const date = time ? new Date(time) :new Date(this.searchTime)
let y = date.getFullYear()
let m = date.getMonth() + 1
if (m<10){
m = '0' + m
}
let d = date.getDate()
if (d<10){
d = '0' + d
}
let startTime = `${y}-${m}-01`
let endTime = `${y}-${m}-${d}`
let startTime
let endTime
console.log('realMonth',realMonth)
console.log('m',m)
if (realMonth>m){
if (m<10){
m = '0' + m
}
let day = this.$util.getThisMonthDay(`${y}-${m}`)
startTime=`${y}-${m}-01`
endTime=`${y}-${m}-${day}`
}else{
if (m<10){
m = '0' + m
}
startTime=`${y}-${m}-01`
endTime=`${y}-${m}-${d}`
}
const res = await request.$webGet(`CommercialApi/Examine/WeChat_GetExamineList`,{
SearchStartDate: startTime,//

View File

@ -0,0 +1,94 @@
<template>
<view class="main">
<canvas class="month" canvas-id="month" id="month"/>
</view>
</template>
<script>
import uCharts from '@/components/u-charts.js';
var uChartsInstance = {};
export default {
name: "monthCharts",
data(){
return {
}
},
props:{
success:{
type: Number,
default: 0
}
},
watch:{
success:{
handler(value){
console.log('value111',value)
let success = Number(value)>100?100:Number(value)
let error = Number(100 - value)<0?0:Number(100 - value)
let res = {
series:[{
data:[{name:'已完成',value:success},{name:'未完成',value:error}]
}]
}
this.drawCharts('month',res)
}
}
},
methods:{
drawCharts(id,data){
const ctx = uni.createCanvasContext(id, this);
let _this = this
uChartsInstance[id] = new uCharts({
type: "ring",
context: ctx,
width: 68,
height: 68,
series: data.series,
animation: true,
rotate: false,
rotateLock: false,
background: "#FFFFFF",
color: ["#576EFF","#EBEEF2"],
padding: [5,5,5,5],
dataLabel: false,
enableScroll: false,
legend: {
show: false,
position: "right",
lineHeight: 25
},
title: {
name: _this.success + '%',
fontSize: 10,
color: "#3D57FB"
},
extra: {
ring: {
ringWidth: 10,
activeOpacity: 0.5,
activeRadius: 10,
offsetAngle: -90,
labelWidth: 15,
border: false,
borderWidth: 3,
customRadius:34,
borderColor: "#FFFFFF"
}
}
});
},
}
}
</script>
<style lang="scss" scoped>
.main{
width: 100%;
height: 100%;
.month{
width: 136rpx;
height: 136rpx;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -175,7 +175,9 @@
noDataText: '抱歉,没有数据,请稍后重试',
regionType: 0, // 0 1 西
ServerpartList: [],
insideRegionList: [] //
insideRegionList: [], //
queryTime:'',//
lastDay:'',//
}
},
computed:{
@ -214,6 +216,7 @@
getList(){
let _this = this
let searchTime = this.pageData.searchTime
console.log('searchTime',searchTime)
// _this.$request.$webGet('WeChat/GetRevenueReport',{
request.$webGet('CommercialApi/Revenue/GetRevenueReport',{
startTime: searchTime[0],
@ -247,12 +250,39 @@
})
}
},
onLoad() {
onLoad(query) {
uni.showLoading({
title:'正在加载...',
mask:true
})
console.log('query',query)
this.lastDay = uni.getStorageSync('lastDay')
if (query.time){
this.queryTime = query.time
const date = new Date(this.queryTime)
let y = date.getFullYear()
let m = date.getMonth() + 1
const realDate = new Date(this.lastDay)
let realMonth = realDate.getMonth() + 1
if (m<realMonth){
if (m<10){
m = '0'+ m
}
let day = this.$util.getThisMonthDay(`${y}-${m}`)
let time = [`${y}-${m}-01`,`${y}-${m}-${day}`]
this.pageData.searchTime = time
}else{
if (m<10){
m = '0'+ m
}
let d = realDate.getDate()
if (d<10){
d = '0'+d
}
let time = [`${y}-${m}-01`,`${y}-${m}-${d}`]
this.pageData.searchTime = time
}
}
this.getList()
}
}

View File

@ -180,6 +180,7 @@ export default {
},
//
handleNoChange(){
let _this = this
uni.showModal({
title: '是否暂不切换分润比例?',
success: function (res) {
@ -187,11 +188,11 @@ export default {
uni.showLoading({
title:'正在加载'
})
this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{
BusinessId: this.PROJECTWARNING_ID, //
StaffId:this.useDate.UserId,//
StaffName:this.useDate.UserName,//
SwitchRate:this.dataDetail.ROYALTY_RATE * 100,//
_this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{
BusinessId: _this.PROJECTWARNING_ID, //
StaffId:_this.useDate.UserId,//
StaffName:_this.useDate.UserName,//
SwitchRate:_this.dataDetail.ROYALTY_RATE * 100,//
ApproveState:'9999',//
}).then(res=>{
uni.hideLoading()
@ -199,7 +200,7 @@ export default {
title: res.Result_Desc,
icon: 'none'
})
this.handleGetDetail()
_this.handleGetDetail()
uni.navigateBack({
delta: 1
})
@ -210,6 +211,7 @@ export default {
},
//
handleChange(){
let _this = this
uni.showModal({
title: '是否切换分润比例?',
success: function (res) {
@ -217,22 +219,22 @@ export default {
uni.showLoading({
title:'正在加载'
})
this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{
BusinessId: this.PROJECTWARNING_ID, //
StaffId:this.useDate.UserId,//
StaffName:this.useDate.UserName,//
SwitchRate:this.dataDetail.ROYALTY_CRATE,//
ApproveState:this.dataDetail.PROJECTWARNING_STATE===1000?'2000':'9000',//
_this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{
BusinessId: _this.PROJECTWARNING_ID, //
StaffId:_this.useDate.UserId,//
StaffName:_this.useDate.UserName,//
SwitchRate:_this.dataDetail.ROYALTY_CRATE,//
ApproveState:_this.dataDetail.PROJECTWARNING_STATE===1000?'2000':'9000',//
}).then(res=>{
uni.hideLoading()
if (this.dataDetail.PROJECTWARNING_STATE===1000){
this.handleBack()
if (_this.dataDetail.PROJECTWARNING_STATE===1000){
_this.handleBack()
}
uni.showToast({
title: res.Result_Desc,
icon: 'none'
})
this.handleGetDetail()
_this.handleGetDetail()
})
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

View File

@ -0,0 +1,8 @@
@font-face {
font-family: 'Alimama ShuHeiTi';
src:url("/static/public/font2/swmcfSKy9zYa.woff2");
font-weight: bold;
font-style: normal;
font-display: swap;
}

Binary file not shown.

View File

@ -9,6 +9,17 @@ export function timestampToTime(timestamp) {
return Y + M + D
}
export function timestampToTimeMonth(timestamp){
const date = new Date(timestamp) //时间戳为10位需*1000时间戳为13位的话不需乘1000
const Y = date.getFullYear() + '-'
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
const D =date.getDate()<10?'0'+date.getDate():date.getDate()
// const h = date.getHours() + ':'
// const m = date.getMinutes() + ':'
// const s = date.getSeconds()
return Y + M
}
export function getThisDay(value) {
switch (value) {
case 1: