更新10.16
This commit is contained in:
parent
9ad6fcb18d
commit
6f21acbccc
@ -146,10 +146,11 @@
|
|||||||
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == false}" @click="showTimeShow = false ">{{ypjyTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == false}" @click="showTimeShow = false ">{{ypjyTitle}} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="近一周" index="2">近一周</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一周" index="2">近一周</el-dropdown-item>-->
|
||||||
<el-dropdown-item command="近一月" index="2">本月</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一月" index="2">本月</el-dropdown-item>-->
|
||||||
<el-dropdown-item command="近一年" index="2">本季度</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一年" index="2">本季度</el-dropdown-item>-->
|
||||||
<el-dropdown-item command="近一年" index="2">本年</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一年" index="2">本年</el-dropdown-item>-->
|
||||||
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == true}" @click="showTimeShow = true"> 自定义
|
<div class="h-anniu" :class="{'q-anniu' : showTimeShow == true}" @click="showTimeShow = true"> 自定义
|
||||||
@ -175,10 +176,7 @@
|
|||||||
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">{{ygphTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : timeShow == false}" @click="timeShow = false ">{{ygphTitle}} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="近一周" index="3">近一周</el-dropdown-item>
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
||||||
<el-dropdown-item command="近一月" index="3">本月</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="近一年" index="3">本季度</el-dropdown-item>
|
|
||||||
<el-dropdown-item command="近一年" index="3">本年</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
@ -220,10 +218,11 @@
|
|||||||
<div class="h-anniu" :class="{'q-anniu' : countTimeShow == false}" @click="countTimeShow = false ">{{sjtjTitle}} <i
|
<div class="h-anniu" :class="{'q-anniu' : countTimeShow == false}" @click="countTimeShow = false ">{{sjtjTitle}} <i
|
||||||
class="el-icon-arrow-down el-icon--right"></i></div>
|
class="el-icon-arrow-down el-icon--right"></i></div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item command="近一周" index="1">近一周</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一周" index="1">近一周</el-dropdown-item>-->
|
||||||
<el-dropdown-item command="近一月" index="1">本月</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一月" index="1">本月</el-dropdown-item>-->
|
||||||
<el-dropdown-item command="近一年" index="1">本季度</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一年" index="1">本季度</el-dropdown-item>-->
|
||||||
<el-dropdown-item command="近一年" index="1">本年</el-dropdown-item>
|
<!-- <el-dropdown-item command="近一年" index="1">本年</el-dropdown-item>-->
|
||||||
|
<el-dropdown-item v-for="(item,index) in amountList" :key="index" :command="item">{{item}} </el-dropdown-item>
|
||||||
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@ -376,7 +375,7 @@ export default {
|
|||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.showValue = [start,new Date()]
|
this.showValue = [start,new Date()]
|
||||||
} else if (command=='近一周'){
|
} else if (command=='本周'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
@ -396,8 +395,11 @@ export default {
|
|||||||
goList() {
|
goList() {
|
||||||
this.$router.push('/notificationList/index')
|
this.$router.push('/notificationList/index')
|
||||||
},
|
},
|
||||||
editShow(command){
|
editShow(e){
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
|
console.log(e)
|
||||||
|
this.ypjyTitle = e
|
||||||
|
let command = e
|
||||||
if (command=='今日'){
|
if (command=='今日'){
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
@ -405,15 +407,15 @@ export default {
|
|||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.showValue = [start,new Date()]
|
this.showValue = [start,new Date()]
|
||||||
} else if (command=='近一周'){
|
} else if (command=='本周'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
} else if (command=='近一月'){
|
} else if (command=='本月'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||||
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
} else if (command=='近一年'){
|
} else if (command=='本年'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
||||||
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
@ -422,24 +424,28 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getDataShow()
|
this.getDataShow()
|
||||||
},
|
},
|
||||||
editCount(command){
|
editCount(e){
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
|
this.sjtjTitle = e
|
||||||
|
console.log("e",e)
|
||||||
|
let command = e
|
||||||
if (command=='今日'){
|
if (command=='今日'){
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
start.setMinutes(0)
|
start.setMinutes(0)
|
||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.showValue = [start,new Date()]
|
this.countValue = [start,new Date()]
|
||||||
} else if (command=='近一周'){
|
} else if (command=='本周'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
} else if (command=='近一月'){
|
} else if (command=='本月'){
|
||||||
|
console.log('进入了人本月')
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
|
||||||
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
} else if (command=='近一年'){
|
} else if (command=='本年'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
|
||||||
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
@ -450,6 +456,7 @@ export default {
|
|||||||
},
|
},
|
||||||
editColor(command){
|
editColor(command){
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
|
this.ygphTitle = command
|
||||||
if (command=='今日'){
|
if (command=='今日'){
|
||||||
let start = new Date();
|
let start = new Date();
|
||||||
start.setHours(0)
|
start.setHours(0)
|
||||||
@ -457,7 +464,7 @@ export default {
|
|||||||
start.setSeconds(0)
|
start.setSeconds(0)
|
||||||
start.setMilliseconds(0)
|
start.setMilliseconds(0)
|
||||||
this.value2 = [start,new Date()]
|
this.value2 = [start,new Date()]
|
||||||
} else if (command=='近一周'){
|
} else if (command=='本周'){
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
|
||||||
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
|
||||||
@ -640,53 +647,38 @@ export default {
|
|||||||
// 首页数据统计
|
// 首页数据统计
|
||||||
const times = this.dataCount.oilData.map(item => item.time);
|
const times = this.dataCount.oilData.map(item => item.time);
|
||||||
const count = [];
|
const count = [];
|
||||||
for (let i = 0; i < this.dataCount.oilNames.length; i++) {
|
let c = ['product', ...this.dataCount.oilNames]
|
||||||
let a = {
|
let countType = []
|
||||||
name: this.dataCount.oilNames[i],
|
count.push(c)
|
||||||
color: color[i],
|
this.dataCount.oilNames.forEach(item => {
|
||||||
type: 'bar',
|
let type={
|
||||||
tooltip: {
|
type: 'bar'
|
||||||
valueFormatter: function (value) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
barWidth: 13,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
barBorderRadius: [50, 50, 0, 0]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
barGap: '60%',
|
|
||||||
data: this.dataCount.oilData.map(item => item.money[i])
|
|
||||||
}
|
}
|
||||||
|
countType.push(type)
|
||||||
|
})
|
||||||
|
this.dataCount.oilData.forEach(item => {
|
||||||
|
let a =[item.time, ...item.money]
|
||||||
|
console.log("a",a)
|
||||||
count.push(a)
|
count.push(a)
|
||||||
}
|
})
|
||||||
|
|
||||||
// 首页数据展示
|
// 首页数据展示
|
||||||
const showTimes = this.dataShows.oilData.map(item => item.day);
|
const showTimes = this.dataShows.oilData.map(item => item.day);
|
||||||
const showCount = [];
|
const showCount = [];
|
||||||
for (let i = 0; i < this.dataShows.oilNames.length; i++) {
|
let cshow = ['product', ...this.dataCount.oilNames]
|
||||||
let a = {
|
showCount.push(cshow)
|
||||||
name: this.dataShows.oilNames[i],
|
let showCountType = []
|
||||||
color: color[i],
|
this.dataCount.oilNames.forEach(item => {
|
||||||
type: 'bar',
|
let type={
|
||||||
tooltip: {
|
type: 'bar'
|
||||||
valueFormatter: function (value) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
barWidth: 13,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
barBorderRadius: [50, 50, 0, 0]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
barGap: '60%',
|
|
||||||
data: this.dataShows.oilData.map(item => item.oilPrices[i])
|
|
||||||
// data: oilAmountList
|
|
||||||
}
|
}
|
||||||
|
showCountType.push(type)
|
||||||
|
})
|
||||||
|
this.dataCount.oilData.forEach(item => {
|
||||||
|
let a =[item.time, ...item.money]
|
||||||
|
console.log("a",a)
|
||||||
showCount.push(a)
|
showCount.push(a)
|
||||||
}
|
})
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
color: [
|
color: [
|
||||||
@ -726,18 +718,6 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: '80%',
|
radius: '80%',
|
||||||
// data: [
|
|
||||||
// // { value: 28, name: '28%' },
|
|
||||||
// // { value: 72, name: '72%' },
|
|
||||||
// {
|
|
||||||
// value: this.countPercentage(Number(this.storeAmount.oilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
|
|
||||||
// name: "油品交易占比"
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// value: this.countPercentage(Number(this.storeAmount.noOilNum), Number(this.storeAmount.oilNum) + Number(this.storeAmount.noOilNum)),
|
|
||||||
// name: "非油品交易占比"
|
|
||||||
// },
|
|
||||||
//
|
|
||||||
// ],
|
// ],
|
||||||
data: this.dataAnalysisIfOilList,
|
data: this.dataAnalysisIfOilList,
|
||||||
emphasis: {
|
emphasis: {
|
||||||
@ -839,8 +819,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
dataset: {
|
||||||
|
source: count
|
||||||
|
},
|
||||||
|
|
||||||
series: count,
|
series: countType,
|
||||||
grid: {
|
grid: {
|
||||||
left: '3%',
|
left: '3%',
|
||||||
right: '3%',
|
right: '3%',
|
||||||
@ -848,6 +831,7 @@ export default {
|
|||||||
containLabel: true
|
containLabel: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
console.log("option3",option3)
|
||||||
const option4 = {
|
const option4 = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
@ -881,7 +865,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: showCount,
|
dataset: {
|
||||||
|
source: showCount
|
||||||
|
},
|
||||||
|
series: showCountType,
|
||||||
grid: {
|
grid: {
|
||||||
left: '3%',
|
left: '3%',
|
||||||
right: '3%',
|
right: '3%',
|
||||||
|
Loading…
Reference in New Issue
Block a user