This commit is contained in:
cun-nan 2024-07-27 17:02:27 +08:00
parent 59bd0a6460
commit f2dbb2d8cd
3 changed files with 29 additions and 10 deletions

View File

@ -149,11 +149,13 @@
range-separator="至"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期">
end-placeholder="结束日期"
:disabled="disabled"
@change="getStoreList()">
</el-date-picker>
</div>
<div id="ctct" style="width: 100%; height: 315px;background: linear-gradient( 360deg, #F8F0E7 0%, #FFFFFF 100%); "></div>
<div id="cccc" style="width: 300px;height: 200px;"></div>
<!-- <div id="cccc" style="width: 300px;height: 200px;"></div>-->
</div>
@ -170,7 +172,7 @@ import {getListApi} from "@/api/setting/hardware";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
export default {
props:["accountId"],
props:["accountId",'deptId'],
data(){
return{
form: {},
@ -179,8 +181,10 @@ export default {
"近一周",
"近一月",
"近一年",
"自定义",
],
timeIndex:0,
disabled:true,
options: [{
value: '选项1',
label: '黄金糕'
@ -219,7 +223,9 @@ export default {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
this.getStoreTotal()
this.selectChildByDeptIdApi()
this.getStoreAmount()
// this.getStoreAmount()
this.value = this.deptId
this.chooseDept()
this.selectBannerList()
let start = new Date();
start.setHours(0)
@ -252,6 +258,7 @@ export default {
},
editColor(index){
this.timeIndex = index
this.disabled = true
if (this.timeList[index]=='今日'){
let start = new Date();
start.setHours(0)
@ -271,6 +278,8 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (this.timeList[index]=='自定义'){
this.disabled = false
}
this.getStoreList()
},
@ -323,7 +332,7 @@ export default {
},
initChart() {
const chart = echarts.init(document.getElementById('ccc'))
const chart1 = echarts.init(document.getElementById('cccc'))
// const chart1 = echarts.init(document.getElementById('cccc'))
const chart2= echarts.init(document.getElementById('ccct'))
const chart4= echarts.init(document.getElementById('cttt'))
const chart3= echarts.init(document.getElementById('ctct'))
@ -637,7 +646,7 @@ export default {
]
};
chart.setOption(option)
chart1.setOption(option1)
// chart1.setOption(option1)
chart2.setOption(option2)
chart3.setOption(option3)
chart4.setOption(option4)

View File

@ -157,6 +157,7 @@
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:disabled="disabled"
@change="getStoreList()">
</el-date-picker>
</div>
@ -177,7 +178,7 @@ import {getListApi} from "@/api/setting/hardware";
import {getNotificationlogList} from "@/api/sys/sysNotificationlog";
export default {
props:["accountId"],
props:["accountId",'deptId'],
data(){
return{
form: {},
@ -186,6 +187,7 @@ export default {
"近一周",
"近一月",
"近一年",
"自定义",
],
timeIndex:0,
options: [{
@ -207,6 +209,7 @@ export default {
value: '',
value1: [],
value2: [],
disabled:true,
imagePath: process.env.VUE_APP_SERVER_URL,
queryParams:{},
//
@ -226,7 +229,9 @@ export default {
this.value1 = [parseTime(oneWeekAgo),parseTime(nowDate)]
this.getStoreTotal()
this.selectChildByDeptIdApi()
this.getStoreAmount()
// this.getStoreAmount()
this.value = this.deptId
this.chooseDept()
this.selectBannerList()
let start = new Date();
start.setHours(0)
@ -259,6 +264,7 @@ export default {
},
editColor(index){
this.timeIndex = index
this.disabled = true
if (this.timeList[index]=='今日'){
let start = new Date();
start.setHours(0)
@ -278,6 +284,8 @@ export default {
let nowDate = new Date();
let oneWeekAgo = new Date(nowDate.getFullYear() - 1, nowDate.getMonth(), nowDate.getDate())
this.value2 = [parseTime(oneWeekAgo),parseTime(nowDate)]
}else if (this.timeList[index]=='自定义'){
this.disabled = false
}
this.getStoreList()
},

View File

@ -1,9 +1,9 @@
<template>
<div class="">
<!-- 代理-->
<agent v-if="power == 1" :accountId="accountId"></agent>
<agent v-if="power == 1" :accountId="accountId" :deptId="deptId"></agent>
<!-- 连锁-->
<manage v-if="power == 2" :accountId="accountId"></manage>
<manage v-if="power == 2" :accountId="accountId" :deptId="deptId"></manage>
<!-- 油站-->
<shopowner v-if="power == 3" :accountId="accountId"></shopowner>
</div>
@ -19,6 +19,7 @@ export default {
return{
power:1,
accountId:"",
deptId:'',
}
},
created() {
@ -40,6 +41,7 @@ export default {
this.power = 3
}
this.accountId = res.data.accountId
this.deptId = res.data.deptId
})
}
}