update
This commit is contained in:
parent
40faac6de8
commit
9f3bba9608
@ -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">
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
@ -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;
|
||||
|
||||
@ -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){
|
||||
@ -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,// 考核日期(开始时间)
|
||||
|
||||
94
pages/index/components/monthCharts.vue
Normal file
94
pages/index/components/monthCharts.vue
Normal 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
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 |
BIN
static/public/font2/AlimamaShuHeiTi-Bold.ttf
Normal file
BIN
static/public/font2/AlimamaShuHeiTi-Bold.ttf
Normal file
Binary file not shown.
8
static/public/font2/stylesheet.css
Normal file
8
static/public/font2/stylesheet.css
Normal 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;
|
||||
}
|
||||
|
||||
BIN
static/public/font2/swmcfSKy9zYa.woff2
Normal file
BIN
static/public/font2/swmcfSKy9zYa.woff2
Normal file
Binary file not shown.
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user