Browse Source

首页去掉默认数据

master
songguoqiang 12 months ago
parent
commit
36df8d63f9
  1. 9
      src/views/Home/Index.vue
  2. 155
      src/views/Home/echarts-data.ts
  3. 5
      src/views/dingtalk/dingtalkrecords/dingtalkRecords.data.ts

9
src/views/Home/Index.vue

@ -97,7 +97,7 @@ const getWeeklyUserActivity = async () => {
text: '检测类型导入次数(近7天)', text: '检测类型导入次数(近7天)',
left: 0, left: 0,
textStyle:{ textStyle:{
fontSize:16, fontSize:14,
} }
}) })
@ -136,9 +136,7 @@ const getWeeklyUserActivity = async () => {
}, },
{ {
name: '性能', name: '性能',
data: data3.forEach(element => { data: data3,
element
}),
type: 'bar', type: 'bar',
animationDuration: 2000, animationDuration: 2000,
animationEasing: 'cubicInOut' animationEasing: 'cubicInOut'
@ -158,7 +156,7 @@ const getWeeklyUserActivity1 = async () => {
text: '检测类型导入次数(近7天)', text: '检测类型导入次数(近7天)',
left: 0, left: 0,
textStyle:{ textStyle:{
fontSize:16, fontSize:14,
} }
}) })
set( set(
@ -212,6 +210,7 @@ onMounted(async() => {//初始化方法
echartsData.value = await rescordAPI.getSYEchartsData(); echartsData.value = await rescordAPI.getSYEchartsData();
await getWeeklyUserActivity() await getWeeklyUserActivity()
await getWeeklyUserActivity1() await getWeeklyUserActivity1()
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

155
src/views/Home/echarts-data.ts

@ -9,18 +9,6 @@ export const lineOptions: EChartsOption = {
}, },
xAxis: { xAxis: {
data: [ data: [
// t('analysis.january'),
// t('analysis.february'),
// t('analysis.march'),
// t('analysis.april'),
// t('analysis.may'),
// t('analysis.june'),
// t('analysis.july'),
// t('analysis.august'),
// t('analysis.september'),
// t('analysis.october'),
// t('analysis.november'),
// t('analysis.december')
], ],
boundaryGap: false, boundaryGap: false,
axisTick: { axisTick: {
@ -47,15 +35,15 @@ export const lineOptions: EChartsOption = {
} }
}, },
legend: { legend: {
data: [t('analysis.estimate'), t('analysis.actual')], data: [],
top: 50 top: 50
}, },
series: [ series: [
{ {
name: t('analysis.estimate'), name: "",
smooth: true, smooth: true,
type: 'line', type: 'line',
data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], data: [],
animationDuration: 2800, animationDuration: 2800,
animationEasing: 'cubicInOut' animationEasing: 'cubicInOut'
}, },
@ -64,7 +52,7 @@ export const lineOptions: EChartsOption = {
smooth: true, smooth: true,
type: 'line', type: 'line',
itemStyle: {}, itemStyle: {},
data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123], data: [],
animationDuration: 2800, animationDuration: 2800,
animationEasing: 'quadraticOut' animationEasing: 'quadraticOut'
} }
@ -73,7 +61,7 @@ export const lineOptions: EChartsOption = {
export const pieOptions: EChartsOption = { export const pieOptions: EChartsOption = {
title: { title: {
text: t('analysis.userAccessSource'), text: "",
left: 'center' left: 'center'
}, },
tooltip: { tooltip: {
@ -84,25 +72,15 @@ export const pieOptions: EChartsOption = {
orient: 'vertical', orient: 'vertical',
left: 'left', left: 'left',
data: [ data: [
t('analysis.directAccess'),
t('analysis.mailMarketing'),
t('analysis.allianceAdvertising'),
t('analysis.videoAdvertising'),
t('analysis.searchEngines')
] ]
}, },
series: [ series: [
{ {
name: t('analysis.userAccessSource'), name: "",
type: 'pie', type: 'pie',
radius: '55%', radius: '55%',
center: ['50%', '60%'], center: ['50%', '60%'],
data: [ data: [
{ value: 335, name: t('analysis.directAccess') },
{ value: 310, name: t('analysis.mailMarketing') },
{ value: 234, name: t('analysis.allianceAdvertising') },
{ value: 135, name: t('analysis.videoAdvertising') },
{ value: 1548, name: t('analysis.searchEngines') }
] ]
} }
] ]
@ -110,7 +88,7 @@ export const pieOptions: EChartsOption = {
export const barOptions: EChartsOption = { export const barOptions: EChartsOption = {
title: { title: {
text: t('analysis.weeklyUserActivity'), text: "",
left: 'center' left: 'center'
}, },
tooltip: { tooltip: {
@ -127,13 +105,6 @@ export const barOptions: EChartsOption = {
xAxis: { xAxis: {
type: 'category', type: 'category',
data: [ data: [
t('analysis.monday'),
t('analysis.tuesday'),
t('analysis.wednesday'),
t('analysis.thursday'),
t('analysis.friday'),
t('analysis.saturday'),
t('analysis.sunday')
], ],
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
@ -144,8 +115,8 @@ export const barOptions: EChartsOption = {
}, },
series: [ series: [
{ {
name: t('analysis.activeQuantity'), name: "",
data: [13253, 34235, 26321, 12340, 24643, 1322, 1324], data: [],
type: 'bar' type: 'bar'
} }
] ]
@ -153,31 +124,20 @@ export const barOptions: EChartsOption = {
export const radarOption: EChartsOption = { export const radarOption: EChartsOption = {
legend: { legend: {
data: [t('workplace.personal'), t('workplace.team')] data: []
}, },
radar: { radar: {
// shape: 'circle', // shape: 'circle',
indicator: [ indicator: [
{ name: t('workplace.quote'), max: 65 },
{ name: t('workplace.contribution'), max: 160 },
{ name: t('workplace.hot'), max: 300 },
{ name: t('workplace.yield'), max: 130 },
{ name: t('workplace.follow'), max: 100 }
] ]
}, },
series: [ series: [
{ {
name: `xxx${t('workplace.index')}`, name: "",
type: 'radar', type: 'radar',
data: [ data: [
{
value: [42, 30, 20, 35, 80],
name: t('workplace.personal')
},
{
value: [50, 140, 290, 100, 90],
name: t('workplace.team')
}
] ]
} }
] ]
@ -214,94 +174,7 @@ export const wordOptions = {
} }
}, },
data: [ data: [
{
name: 'Sam S Club',
value: 10000,
textStyle: {
color: 'black'
},
emphasis: {
textStyle: {
color: 'red'
}
}
},
{
name: 'Macys',
value: 6181
},
{
name: 'Amy Schumer',
value: 4386
},
{
name: 'Jurassic World',
value: 4055
},
{
name: 'Charter Communications',
value: 2467
},
{
name: 'Chick Fil A',
value: 2244
},
{
name: 'Planet Fitness',
value: 1898
},
{
name: 'Pitch Perfect',
value: 1484
},
{
name: 'Express',
value: 1112
},
{
name: 'Home',
value: 965
},
{
name: 'Johnny Depp',
value: 847
},
{
name: 'Lena Dunham',
value: 582
},
{
name: 'Lewis Hamilton',
value: 555
},
{
name: 'KXAN',
value: 550
},
{
name: 'Mary Ellen Mark',
value: 462
},
{
name: 'Farrah Abraham',
value: 366
},
{
name: 'Rita Ora',
value: 360
},
{
name: 'Serena Williams',
value: 282
},
{
name: 'NCAA baseball tournament',
value: 273
},
{
name: 'Point Break',
value: 265
}
] ]
} }
] ]

5
src/views/dingtalk/dingtalkrecords/dingtalkRecords.data.ts

@ -76,6 +76,11 @@ export const DingtalkRecords = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sendName', field: 'sendName',
isSearch: false isSearch: false
}, },
{
label: '推送状态',
field: 'isSuccess',
isSearch: false
},
// { // {
// label: '导入数据人', // label: '导入数据人',
// field: 'importCreator', // field: 'importCreator',

Loading…
Cancel
Save