diff --git a/fuintAdmin/src/views/shopowner.vue b/fuintAdmin/src/views/shopowner.vue
index 7d2a723fb..fbd5c910a 100644
--- a/fuintAdmin/src/views/shopowner.vue
+++ b/fuintAdmin/src/views/shopowner.vue
@@ -146,10 +146,11 @@
{{ypjyTitle}}
- 近一周
- 本月
- 本季度
- 本年
+
+
+
+
+ {{item}}
自定义
@@ -175,10 +176,7 @@
{{ygphTitle}}
- 近一周
- 本月
- 本季度
- 本年
+ {{item}}
@@ -220,10 +218,11 @@
{{sjtjTitle}}
- 近一周
- 本月
- 本季度
- 本年
+
+
+
+
+ {{item}}
@@ -267,10 +266,10 @@ export default {
data() {
return {
amountList:[
- "今日 " ,
- "昨日 " ,
- "本周 " ,
- "本月 " ,
+ "今日" ,
+ "昨日" ,
+ "本周" ,
+ "本月" ,
"本季度" ,
"本年"
@@ -376,7 +375,7 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.showValue = [start,new Date()]
- } else if (command=='近一周'){
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
@@ -396,8 +395,11 @@ export default {
goList() {
this.$router.push('/notificationList/index')
},
- editShow(command){
+ editShow(e){
this.disabled = true
+ console.log(e)
+ this.ypjyTitle = e
+ let command = e
if (command=='今日'){
let start = new Date();
start.setHours(0)
@@ -405,44 +407,48 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.showValue = [start,new Date()]
- } else if (command=='近一周'){
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一月'){
+ this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本月'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一年'){
+ this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ this.showValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
this.getDataShow()
},
- editCount(command){
+ editCount(e){
this.disabled = true
+ this.sjtjTitle = e
+ console.log("e",e)
+ let command = e
if (command=='今日'){
let start = new Date();
start.setHours(0)
start.setMinutes(0)
start.setSeconds(0)
start.setMilliseconds(0)
- this.showValue = [start,new Date()]
- } else if (command=='近一周'){
+ this.countValue = [start,new Date()]
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一月'){
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本月'){
+ console.log('进入了人本月')
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 30 * 24 * 60 * 60 * 1000)
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
- } else if (command=='近一年'){
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ } else if (command=='本年'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
- this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
+ this.countValue = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (command=='自定义'){
this.disabled = false
}
@@ -450,6 +456,7 @@ export default {
},
editColor(command){
this.disabled = true
+ this.ygphTitle = command
if (command=='今日'){
let start = new Date();
start.setHours(0)
@@ -457,7 +464,7 @@ export default {
start.setSeconds(0)
start.setMilliseconds(0)
this.value2 = [start,new Date()]
- } else if (command=='近一周'){
+ } else if (command=='本周'){
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getTime() - 6 * 24 * 60 * 60 * 1000)
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
@@ -640,53 +647,38 @@ export default {
// 首页数据统计
const times = this.dataCount.oilData.map(item => item.time);
const count = [];
- for (let i = 0; i < this.dataCount.oilNames.length; i++) {
- let a = {
- name: this.dataCount.oilNames[i],
- color: color[i],
- type: 'bar',
- tooltip: {
- 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])
+ let c = ['product', ...this.dataCount.oilNames]
+ let countType = []
+ count.push(c)
+ this.dataCount.oilNames.forEach(item => {
+ let type={
+ type: 'bar'
}
+ countType.push(type)
+ })
+ this.dataCount.oilData.forEach(item => {
+ let a =[item.time, ...item.money]
+ console.log("a",a)
count.push(a)
- }
+ })
// 首页数据展示
const showTimes = this.dataShows.oilData.map(item => item.day);
const showCount = [];
- for (let i = 0; i < this.dataShows.oilNames.length; i++) {
- let a = {
- name: this.dataShows.oilNames[i],
- color: color[i],
- type: 'bar',
- tooltip: {
- 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
+ let cshow = ['product', ...this.dataCount.oilNames]
+ showCount.push(cshow)
+ let showCountType = []
+ this.dataCount.oilNames.forEach(item => {
+ let type={
+ type: 'bar'
}
+ showCountType.push(type)
+ })
+ this.dataCount.oilData.forEach(item => {
+ let a =[item.time, ...item.money]
+ console.log("a",a)
showCount.push(a)
- }
+ })
const option = {
color: [
@@ -726,18 +718,6 @@ export default {
name: '',
type: 'pie',
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,
emphasis: {
@@ -839,8 +819,11 @@ export default {
}
],
+ dataset: {
+ source: count
+ },
- series: count,
+ series: countType,
grid: {
left: '3%',
right: '3%',
@@ -848,6 +831,7 @@ export default {
containLabel: true
}
};
+ console.log("option3",option3)
const option4 = {
tooltip: {
trigger: 'axis',
@@ -881,7 +865,10 @@ export default {
}
}
],
- series: showCount,
+ dataset: {
+ source: showCount
+ },
+ series: showCountType,
grid: {
left: '3%',
right: '3%',